Commit Graph

47 Commits

Author SHA1 Message Date
evazion
0376765847 views: standardize timestamp format across history pages.
Standardize the timestamp format across various history pages to look like this:

    DanbooruBot »
    2022-01-19 23:28
2022-01-19 23:33:06 -06:00
Aaron Franke
191b528ad7 Ensure files end in newlines (POSIX compliance) 2020-10-04 05:13:39 -04:00
evazion
20f8a26709 tests: fix rails 2.7 keyword parameter deprecation warnings. 2020-05-25 01:48:46 -05:00
BrokenEagle
e23ee170f5 Add alternate comparison types to versions
- The types are:
-- Previous: The default and the previously used type
-- Subsequent: Compares against the next version
-- Current: Compares against the current version
- Allow switching between comparison types in index and diff views
-- Have links vary depending upon current comparison type
2020-03-17 18:31:20 +00:00
BrokenEagle
a95e57d938 Move more logic to the helper modules
- Diff view changes
-- Only show pool description changes in diff view
-- Conditionally render diff link when applicable values are changed
-- Conditionally show diff view sections when values are changed
- Show renames on index view
-- There is plenty of space
-- This wasn't shown at all for wikis
-- Having to navigate to an alternate page is unwieldy for pools
- Show "posts" as a status on pools
-- This is so all changes among versions are quantified as a status
- Standardize diff/index titles
2020-03-17 18:31:20 +00:00
BrokenEagle
d8fd1c212e Revise display on note versions index
- Body now uses the diff builder to highlight changes
-- A generalized diff-body class was added instead of something specific
- The status changes are now verbalized instead of being shown with styles
- The position and sizes are now split up
-- Changes directly reference the previous version
- The date and user columns were combined
-- This is more in line with other indexes, plus it saves space
2020-02-08 22:57:27 +00:00
BrokenEagle
b3b896a9e3 Fix search by post ID and note ID links
- These were missing and needed on the vanilla note versions index
- Now they appear only if that particular URL parameter is not present
2020-01-13 21:21:15 +00:00
BrokenEagle
5d5cc66502 Remove empty column 2020-01-13 21:21:14 +00:00
BrokenEagle
63203d24cc Standardize use of column width parameter 2020-01-13 21:21:14 +00:00
BrokenEagle
3ab2c4c3ea Use optional parameter to set column class
- Fixes the extremely long class name on the post versions view
- Can now use one value instead of having to set th and td
- Added missing column classes on all tables
2020-01-13 21:21:13 +00:00
evazion
d0d3da08e5 views: remove IP addresses from most pages.
Removed IP addresses from comments and from most other listing pages.
IPs take up a lot of space in many places (especially IPv6 addresses),
and in most of these pages they're rarely useful for catching
sockpuppets.
2020-01-09 16:55:09 -06:00
evazion
5c913d8ad1 table builder: fix various incorrect css classes.
Change calling convention to explicitly indicate whether the attributes
are for the <th> element or the <td> element. Fixes various cases where
the two were mixed up.

* Fix .col-expand classes not being set correctly on the /post_versions,
  /pool_versions, and /notes pages.

* Fix .updater and .updated-at classes not being set correctly on the
  /forum_topics page.

* Fix the name param being ignored (noticeable in the post count field
  on the /tags page).

* Don't pass empty string when column has no name.
2020-01-07 02:40:59 -06:00
BrokenEagle
e8a96c1a2a Standardized naming of version list views 2020-01-04 22:02:44 +00:00
BrokenEagle
be92282990 Combine version partials into one file 2020-01-04 22:02:43 +00:00
BrokenEagle
043944e1dd Convert index tables to using table builder 2020-01-04 22:02:43 +00:00
evazion
f151285038 views: standardize page titles. 2019-08-24 22:55:35 -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
BrokenEagle
613beee375 Differentiate version views with reversion links 2018-01-01 19:36:27 -08:00
evazion
e875f2973a /notes, /note_versions: link directly to note within post.
Also adds a "»" link, linking to the note's history.
2017-07-07 16:39:10 -05:00
evazion
989917cb07 /notes, /note_versions: use numbered paginator. 2017-04-23 14:59:36 -05:00
evazion
bdf3366bcf Link IP addresses to IP searches. 2017-01-12 09:15:14 +00:00
r888888888
1d9596d7f2 fixes #2417 2015-06-29 18:17:59 -07:00
Toks
ad8e16aabf fix #2012 2015-04-15 11:29:15 -04:00
r888888888
fad0ab7c93 fixes #2133 2014-04-16 17:43:34 -07:00
Toks
ab0b935715 Clean up note views
* Make note deleted notice stand out more
* Use same note deleted notice on both note views
* Don't render notes as dtext
2013-07-18 12:51:10 -04:00
Toks
77dfd91702 fixes #1658; fixes #1592 2013-05-25 19:49:19 -04:00
Toks
3648db0928 fixes #1139, fix other history page inconsistencies 2013-04-05 16:24:27 -04:00
Toks
8b33cac661 replace old user links with new format 2013-04-04 23:16:28 -04:00
Toks
4f42ab8bdb adds support for user level-dependent classes
all links to users should have their class attribute set to that user's
level_class
2013-03-30 12:04:58 -04:00
albert
4dcc21a97a fixes #948 2013-03-22 10:47:24 -07:00
小太
1a03a86592 Kill trailing whitespace in erb files 2013-03-19 23:11:58 +11:00
albert
65d366e71f fixes #756 - hide table header 2013-03-05 20:38:30 -05:00
albert
7585462368 add test case for note 2013-02-23 10:44:42 -05:00
albert
bbb8767b29 make forum post quoting regexp nongreedy 2013-02-22 12:24:10 -05:00
albert
8749c43b3e refactored search 2013-01-10 17:45:52 -05:00
albert
f6367aab49 layout fixes 2011-11-03 17:14:41 -04:00
albert
34ae712be0 fixed titles 2011-10-23 16:55:57 -04:00
albert
1b7102b2e6 style improvements 2011-10-15 13:10:24 -04:00
albert
63d3cb337a Fixes #82: Notes do not hide when clicking image 2011-09-18 17:59:20 -04:00
albert
3183872b1e Fixes #39: Reverting a translation does not work 2011-09-11 14:47:35 -04:00
albert
24bf21540a refactoring views 2011-08-16 18:47:01 -04:00
albert
c8afd34d15 added ip addr search 2011-07-29 18:04:50 -04:00
albert
a16dfdf0dd fixes 2011-07-09 03:32:18 -04:00
albert
2f1fdcb459 more work on paginators 2011-06-21 14:32:07 -04:00
albert
cbd877d020 fixed comment vote functional test 2011-04-01 19:01:17 -04:00
albert
9e7efbd295 stubbed in view code from old danbooru; only janitors can lock a wiki page 2011-02-28 14:18:39 -05:00
albert
683d4583ac * Added note version controller and test
* Added pool version controller and test
* Refactored unit tests for post disapprovals
* Renamed PostModerationDetail to PostDisapproval
2011-01-25 18:13:05 -05:00