Commit Graph

134 Commits

Author SHA1 Message Date
Albert Yi
9f33b14fa8 adjust styling 2018-06-14 17:52:41 -07:00
Albert Yi
b0c2ddba8b update tests 2018-06-14 17:52:41 -07:00
Albert Yi
0e6c358701 add drag and drop file uploads w/async processing
[skip ci]
2018-06-14 17:52:41 -07:00
Albert Yi
fdd7582fb0 add support for upload preprocessing 2018-06-14 17:52:41 -07:00
evazion
442964b0eb tag_set_presenter: refactor split_tag_list_html.
* Make category headers optional.
* Make category order configurable.
* Clean up code.
2018-04-25 22:12:10 -05:00
evazion
c9acbbdf9e uploads: revamp /uploads listing UI (#3657).
* Add thumbnails.
* Colorize tags.
* Rearrange columns.
* Add rating/source/size/dimensions info.
* Add "»" search drilldown links.
2018-04-20 15:52:09 -05:00
evazion
e6ce05eb29 uploads: add more search options for /uploads listing (#3657). 2018-04-20 15:51:56 -05:00
evazion
ff4616e7b2 uploads: add upload-specific secondary links. 2018-04-20 15:51:56 -05:00
evazion
8083c7daae uploads: fix batch upload page to work without bookmarklet.
* Add a form to the /uploads/batch page so that it can be used without
  the bookmarklet.

* Fix an exception when no url is given.
2018-04-20 15:51:56 -05:00
evazion
bca483cefd Fix #3628: Retry button is displayed for failed uploads that cannot succeed even if retried 2018-04-12 22:14:06 -05:00
Albert Yi
cd88a8df9f fixes #3620 2018-04-12 13:00:48 -07:00
r888888888
abce4d2551 Raise error on unpermitted params.
Fail loudly if we forget to whitelist a param instead of silently
ignoring it.

misc models: convert to strong params.

artist commentaries: convert to strong params.

* Disallow changing or setting post_id to a nonexistent post.

artists: convert to strong params.

* Disallow setting `is_banned` in create/update actions. Changing it
  this way instead of with the ban/unban actions would leave the artist in
  a partially banned state.

bans: convert to strong params.

* Disallow changing the user_id after the ban has been created.

comments: convert to strong params.

favorite groups: convert to strong params.

news updates: convert to strong params.

post appeals: convert to strong params.

post flags: convert to strong params.

* Disallow users from setting the `is_deleted` / `is_resolved` flags.

ip bans: convert to strong params.

user feedbacks: convert to strong params.

* Disallow users from setting `disable_dmail_notification` when creating feedbacks.
* Disallow changing the user_id after the feedback has been created.

notes: convert to strong params.

wiki pages: convert to strong params.

* Also fix non-Builders being able to delete wiki pages.

saved searches: convert to strong params.

pools: convert to strong params.

* Disallow setting `post_count` or `is_deleted` in create/update actions.

janitor trials: convert to strong params.

post disapprovals: convert to strong params.

* Factor out quick-mod bar to shared partial.
* Fix quick-mod bar to use `Post#is_approvable?` to determine visibility
  of Approve button.

dmail filters: convert to strong params.

password resets: convert to strong params.

user name change requests: convert to strong params.

posts: convert to strong params.

users: convert to strong params.

* Disallow setting password_hash, last_logged_in_at, last_forum_read_at,
  has_mail, and dmail_filter_attributes[user_id].

* Remove initialize_default_image_size (dead code).

uploads: convert to strong params.

* Remove `initialize_status` because status already defaults to pending
  in the database.

tag aliases/implications: convert to strong params.

tags: convert to strong params.

forum posts: convert to strong params.

* Disallow changing the topic_id after creating the post.
* Disallow setting is_deleted (destroy/undelete actions should be used instead).
* Remove is_sticky / is_locked (nonexistent attributes).

forum topics: convert to strong params.

* merges https://github.com/evazion/danbooru/tree/wip-rails-5.1
* lock pg gem to 0.21 (1.0.0 is incompatible with rails 5.1.4)
* switch to factorybot and change all references

Co-authored-by: r888888888 <r888888888@gmail.com>
Co-authored-by: evazion <noizave@gmail.com>

add diffs
2018-04-06 18:09:57 -07:00
r888888888
a8c4179083 fix html class in uploads/new 2018-01-02 15:34:43 -08:00
Albert Yi
b315ee25bc Merge pull request #3471 from BrokenEagle/fix-controller-views
Various fixes for controller views
2017-12-28 11:18:44 -08:00
BrokenEagle
31d3215dad Fix page controller and action IDs
- Also fix affected CSS and JS files
2017-12-28 10:20:12 -08:00
r888888888
659eb62402 css tweaks 2017-12-26 16:06:16 -08:00
BrokenEagle
d54b26c61d Convert tag category Javascript/CSS assets to ERB 2017-12-24 17:01:17 -08:00
Albert Yi
4d6dc895d6 Merge pull request #3362 from BrokenEagle/feat-client-input-validation
Moved input existence validations to client (#3352)
2017-11-21 10:56:14 -08:00
BrokenEagle
63773fed6b Fixes #3366 2017-11-14 07:39:25 -08:00
BrokenEagle
f91e11bb41 Moved input existence validations to client 2017-11-13 14:08:34 -08:00
BrokenEagle
6838901aac Moved non-config tag category info to its own class 2017-11-07 16:21:29 -08:00
BrokenEagle
1de8fd2bd6 Moved tag logic for Javascript to config file 2017-11-07 10:58:40 -08:00
r888888888
8874b274ad remove ccs integration 2017-10-17 17:59:26 -07:00
r888888888
0985f929cc style buttons for upload/post edit pages 2017-09-14 16:56:40 -07:00
evazion
6797f8564d upload limits: show full upload limits on upload page. 2017-08-10 23:58:58 -05:00
r888888888
d32e1a51ab expand access of ccs to builders 2017-08-02 17:15:16 -07:00
Albert Yi
9b982b3379 Merge pull request #3228 from r888888888/ccs
integrate with ccs
2017-07-21 18:00:05 -07:00
r888888888
c5a40628e6 integrate with ccs 2017-07-20 15:25:19 -07:00
evazion
7cb7c2fbab Remove ruby DText implementation (#3206). 2017-07-19 16:48:42 -05:00
evazion
e3a4bfd28c /upload/batch: use image proxy for embedded thumbnails. 2017-06-27 13:46:59 -05:00
evazion
281ddae35d /uploads/batch: add thumbnail previews (#3194). 2017-06-27 13:31:47 -05:00
evazion
3ecee91861 Fix #3061: Add "General" button for related tags on new/edit posts. 2017-05-26 12:49:59 -05:00
evazion
c68e68f3c2 /uploads/new: add show/hide commentary toggle button. 2017-05-13 00:18:52 -05:00
evazion
b2f62482a1 Remove artist commentary handling from download rewrite strategies. 2017-05-10 18:01:51 -05:00
evazion
4631262374 Fix broken tag autocomplete on multiple pages.
Mark all tag <input>s with a `data-autocomplete` attribute, instead of
hardcoding a list of html IDs to autocomplete in javascript.

This way should be less error prone. It fixes autocomplete in several places:

* Autocomplete for the search box on /posts didn't work in the
  responsive layout. This was because /posts has two search boxes that
  both have the id `tags`: one in the normal sidebar, and one in the
  responsive tag list. $("#tags") only initialized autocomplete on the
  first one.

* Autocomplete didn't work on the aliases or implications pages. This
  was due to selecting the wrong html ids.
2017-04-22 15:24:03 -05:00
r888888888
c4b5998e64 fixes #2692: Rework bookmarklet preview 2017-03-21 15:41:20 -07:00
Albert Yi
87bcc07fae enable ragel parser for remaining dtext endpoints 2017-01-10 15:12:37 -08:00
Albert Yi
7aab50f726 remove old iqdb code 2016-12-02 13:21:56 -08:00
evazion
1d3ec05348 Fix nil exception on if help:upload_notice doesn't exist. 2016-11-21 01:40:37 -06:00
evazion
5909e8501c Pull upload notice, bookmarklet notice from help:upload_notice wiki page. 2016-11-21 01:17:15 -06:00
evazion
13d4474818 Add self-uploading disclaimer to uploads page. 2016-10-24 18:52:01 -05:00
Type-kun
a7d553038f Add "disable-with" to most edit forms (should fix #2264) 2016-08-30 22:54:38 +05:00
r888888888
329553ea1c fixes #2462: An error on the upload page shouldn't wipe out the url/ref params 2015-12-28 14:57:47 -08:00
r888888888
6480864718 fixes #2469 2015-10-15 15:24:24 -07:00
r888888888
e1a28ef117 Revert "Revert "updated formula for #2492""
This reverts commit 6a02e4f3f3.
2015-08-14 13:56:25 -07:00
r888888888
6a02e4f3f3 Revert "updated formula for #2492"
This reverts commit 04ded35e75.
2015-08-14 13:17:03 -07:00
r888888888
04ded35e75 updated formula for #2492 2015-08-13 15:18:27 -07:00
Toks
0a5f1b53ba #2426 refactor to use predetermined referer 2015-07-05 11:02:01 -04:00
Toks
50f28e780a fix #2425 2015-07-04 22:20:47 -04:00
Toks
b1b31d7387 fixes #2426 2015-07-04 16:31:34 -04:00