Commit Graph

57 Commits

Author SHA1 Message Date
evazion
1af6850c7c posts: add "view original" sidebar option.
* Add a "View original" sidebar option.
* Rename the "View large" sidebar option to "View smaller".
* Remove the "Loading..." message when switching image sizes.
* Fix the V hotkey not working after using it once.
* Change #image-resize-link to .image-view-original link (note that
  there are two of these links now, one in the notice bar and one in the
  sidebar).
* Add a `data-post-current-image-size` attribute on the <body> element
  and use it to control visibility of links and notices.
2020-03-26 22:03:47 -05:00
evazion
a5418abb31 pundit: convert posts to pundit. 2020-03-20 18:03:01 -05:00
evazion
475d6ae7cf modqueue: move url from /moderator/post/queue to /modqueue. 2020-02-29 17:46:58 -06:00
evazion
40711e1d4f posts/show: refactor parent/child notices.
* Convert notices from helpers to partials.
* Eliminate PostSets::PostRelationship class in favor of post_sets/posts template.
* Eliminate COUNT(*) queries when calculating the number of child posts.
* Eliminate redundant parent load and parent exists queries.
2020-01-12 18:38:38 -06:00
evazion
e28a955535 config: remove unneeded config options. 2020-01-07 19:35:57 -06:00
evazion
5422db1c3c Standardize links to wiki help pages.
* Fix inconsistencies in how wiki pages were linked.

* Link directly to the wiki instead of to a title search that is expected
  to redirect to the wiki.
2019-10-31 19:04:18 -05:00
evazion
e98db8a5b8 css: refactor notice box css.
* Remove .ui-corner-all, .ui-state-highlight, .ui-state-error classes
  from notice boxes.
* Use .notice, .notice-info, .notice-error classes instead.
* Replace <p> elements in notices with <div>'s so that we don't have to
  work around the `margin-bottom: 1em` from <p> elements.
* Replace <h1> elements in notices with <h2>.
* Standardize info notices to use the same shade of light yellow in the
  light theme.
2019-09-22 15:09:45 -05:00
evazion
312adb772d views: refactor post flag and appeal reasons.
* Prefer partials over helpers.
* Add css classes to flag/appeal reason lists.
* Wrap dtext in span.prose container.
2019-09-18 03:20:26 -05:00
evazion
9c96557be8 css: standardize post notice css.
* Standardize post notice background colors.
* Replace .ui-state-highlight and .ui-corner-all classes with .post-notice.
* Rename post notice classes (e.g. .notice-parent -> .post-notice-parent).
* Remove hover effect from sequential search navbar.
2019-09-17 00:28:41 -05:00
evazion
654d40875f posts/show: only render detailed rejection dialog for approvers. 2018-09-26 20:46:22 -05: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
evazion
084fcd91ed Only generate tagged filenames for URLs on post show pages (#3597).
Don't generate tagged filenames for urls in the data attributes on
thumbnails, or in the /posts.json api.
2018-04-05 14:20:37 -05:00
Type-kun
04ef575704 Prevent exception if upload feedback topic is not set in config 2017-06-12 22:44:29 +05:00
evazion
3880fbe13e /posts/$id: fix shift+O to approve shortcut.
`Danbooru.Post.approve` is used for approving posts via the mode menu.
It doesn't hide all the notices or the approve/disapprove/flag buttons.
Click the link instead to hide those things.

Click the #quick-mod-approve link instead of #approve because #approve
prompts for confirmation.
2017-06-04 10:07:26 -05:00
r888888888
b3e3012a9c link to upload advice thread for deleted posts 2017-03-22 16:33:14 -07:00
evazion
5e3393817f Link to howto:flag in flag notice. 2016-10-24 18:52:01 -05:00
r888888888
b8f14b6fee hide more pages for banned artists #2132 2016-01-27 17:06:13 -08:00
r888888888
fea20c84dc fixes #2541 (only for new uploads, flagged posts will still show disapprovals immediately) 2015-10-27 11:49:51 -07:00
r888888888
f66d5c3f02 fixes #2461: Mod queue comments 2015-08-05 13:11:32 -07:00
r888888888
40a9f3658c fixes #2447: Display disapproval counts in status bar to uploader and approvers 2015-07-24 14:24:51 -07:00
r888888888
43377e3a82 fixes #2447: Display disapproval counts in status bar to uploader and approvers 2015-07-23 14:29:18 -07:00
r888888888
95e10e3acd fixes #2447: Display disapproval counts in status bar to uploader and approvers 2015-07-22 11:29:46 -07:00
r888888888
a39e390e24 fixes #2446 2015-07-21 15:26:07 -07:00
r888888888
9f8e723d83 fixes #2438: Flagged posts cannot be approved from post page 2015-07-15 13:26:01 -07:00
r888888888
1d9596d7f2 fixes #2417 2015-06-29 18:17:59 -07:00
r888888888
f8b8b6d6f7 fix typo 2015-06-18 17:03:40 -07:00
r888888888
850cabe8fc fixes #2414 2015-06-18 16:48:25 -07:00
Toks
b47a794a93 #2284 hide resize notice 2014-10-26 11:56:20 -04:00
Toks
89d8c01da2 Add V keyboard shortcut for toggling original/sample size 2014-06-09 16:35:16 -04:00
Toks
71cd5ce783 fixes #2114 2014-05-29 22:55:35 -04:00
Toks
c01caeb787 Fix notice for banned posts 2014-03-24 23:27:58 -04:00
Toks
ea787e1644 Floor post resize percentage to prevent displaying 100% 2013-08-13 16:25:10 -04:00
Toks
8558566ff4 Tweak banned post message
Banned posts are not technically deleted
2013-08-04 12:57:14 -04:00
r888888888
4bbfc307c3 better explicit check for existence of parent 2013-06-05 15:04:31 -07:00
r888888888
518c2ea52d fixes #1712 2013-06-05 14:43:45 -07:00
Lightforger
1de2374a60 Update wiki link
http://danbooru.donmai.us/forum_posts/87945
2013-05-01 02:10:15 +03:00
Toks
6c3aabf2b6 simplifies parent/child preview code; fixes #1489 2013-04-30 14:54:40 -04:00
Toks
4775535c11 fixes #1481; fixes #1483
Additionally:
* Rename methods and variables related to the parent/child previews for
consistency.
* Split off siblings into a separate post set.
* Increase limit of children/siblings displayed to max of 200.
2013-04-29 17:12:02 -04:00
Toks
c3f1c99848 fixes #1389
reorganize parent/child messages into helpers
2013-04-27 21:26:22 -04:00
Toks
56436aec08 fixes #1390 2013-04-24 15:28:43 -04:00
r888888888
2dfa616f33 fixes #1350, better db:seed script 2013-04-16 20:23:02 -07:00
Toks
a953189031 adds internal support for notice-specific styles (#1148) 2013-04-05 21:18:29 -04:00
albert
6c54d89a36 * All users can now view deleted posts.
* Posts now have an is_banned flag for artist removal requests.  Basic users can not view banned posts but gold and higher can.
* Banning an artist both deletes the post and bans it.
* By default deleted posts are not filtered out of post searches at the sql level.
2013-03-22 09:38:53 -07:00
小太
1a03a86592 Kill trailing whitespace in erb files 2013-03-19 23:11:58 +11:00
albert
ccc725a631 layout changes 2013-02-23 20:48:35 -05:00
albert
2201e03604 fix color of deleted post notices 2013-02-21 13:29:39 -05:00
albert
c5731298fb clarify post deletion/flag logic 2013-02-19 22:03:01 -05:00
albert
1ef7ef49a5 added share links, moved image resize back to notice banner style 2012-03-30 14:28:46 -04:00
albert
196aaaf0a2 fixes #232 2012-01-07 21:41:04 -05:00
albert
01989af213 fixes #201 2012-01-06 18:32:54 -05:00