Commit Graph

44 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
evazion
1f637867a4 tags: refactor tag lists to use ViewComponent. 2021-02-05 02:37:02 -06:00
evazion
1b30b71a07 posts: refactor post previews to use ViewComponent.
Refactor the post preview html to use the ViewComponent framework. This
lets us encapsulate all the HTML, CSS, and helper methods for a UI
component in a single place.

See https://viewcomponent.org.
2021-01-14 21:17:57 -06:00
evazion
ab4d596ac2 Fix #4405: Post version table css doesn't keep ratio at smaller resolutions.
Bug: extremely long sources cause the Tags column to become extremely
wide. Caused by the source link not having the word-break property set.

Fix: use post_source_tag, which lets the `a[rel=external] { word-break: break-word; }`
rule take effect.

Example: https://danbooru.donmai.us/post_versions?search%5Bpost_id%5D=3809742
2020-04-17 01:46:14 -05:00
BrokenEagle
6aa0adb738 Make the post versions more like the old format
- "Current" is now most like the old format
-- It is therefore now the default for post versions
- Only show the actual edits in their own column
- Show the current state at that version in another column
- On the "previous" view, don't double-show full list of tags for
  the first post versions, so leave edits blank
2020-03-28 06:29:41 +00:00
evazion
41ab3c9f63 post versions: fix undo action. 2020-03-21 23:06:42 -05:00
evazion
ffae64f127 pundit: convert post versions to pundit. 2020-03-20 18:03:01 -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
evazion
60ff2ae929 models: rename post/pool archives to post/pool versions. 2020-02-15 06:52:10 -06:00
BrokenEagle
8ff00cfc7d Rework post version view
- Added a changes column explicitly listing all of the changes
-- This makes it more in line with the other views now
2020-02-08 22:57:30 +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
evazion
abe7f086b6 table builder: eliminate is_html_safe flag. 2020-01-06 01:56:16 -06: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
dade1e67b0 /post_versions: add search form, tweak layout.
* Add search form above table.
* Move thumbnail to left of table when viewing history of single post.
* Remove unrelated links from subnav menu.
* Fix bugs with changed_tags search.
2019-09-30 02:51:13 -05:00
evazion
085e903e02 /post_versions: reorganize layout, add thumbnails.
* Add thumbnails to /post_versions (when viewing history of a single
  post, thumbnail is above table rather than in every table row).
* Combine user, date, and ip address columns into one column.
* Remove rating and parent columns (rating and parent changes are
  already listed in the tags column).
2019-09-28 17:48:35 -05:00
evazion
609a440d1c /post_versions: unify standard and revert listings. 2019-09-28 14:47:21 -05:00
BrokenEagle
613beee375 Differentiate version views with reversion links 2018-01-01 19:36:27 -08:00
r888888888
9757700ec7 fix post archive presenter 2017-05-02 15:57:42 -07:00
evazion
3290f5550a post_versions/_listing.html.erb:40: fix N+1 queries in "Undo" link.
post_version.post.versions.first.id caused an extra query for each post version:

    SELECT "post_versions".* FROM "post_versions" WHERE "post_versions"."post_id" = $1 ORDER BY updated_at ASC, id asc LIMIT 1
2017-03-02 17:46:14 -06:00
evazion
bdf3366bcf Link IP addresses to IP searches. 2017-01-12 09:15:14 +00:00
r888888888
e539fdecff implement post change report 2016-09-07 14:35:44 -07:00
r888888888
2ce86ecb8b add support for post version queries 2016-06-21 13:14:27 -07:00
r888888888
1d9596d7f2 fixes #2417 2015-06-29 18:17:59 -07:00
Toks
5f12a5e555 fixes #2165 2014-05-25 14:50:07 -04:00
Toks
88afa23223 Standardize ip address visibility; fixes #1203 2013-07-11 21:05:56 -04:00
Toks
7726e85e33 fixes #866 2013-06-21 21:55:47 -04:00
Toks
2d0c3d16a3 fix #1724 for posts 2013-06-09 15:18:09 -04:00
Toks
77dfd91702 fixes #1658; fixes #1592 2013-05-25 19:49:19 -04:00
Toks
b008b6f10f remove start_id link for post versions 2013-04-24 17:38:36 -04:00
Toks
9d8330e905 fixes #748 2013-04-20 12:17:13 -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
b025256480 add user classes on more pages 2013-03-31 10:31:28 -04:00
albert
8911738909 fix post version diff method 2013-02-23 16:04:09 -05:00
albert
359a17674c fixes #429 2013-02-19 14:36:31 -05:00
albert
f1e6a5353d fixes #352 2013-01-24 17:28:41 -05:00
albert
e4295dfc60 fix for #241 2012-01-07 22:49:03 -05:00
albert
69044f3389 reverted post version tag change for danbooru2 2011-10-22 21:34:32 -04:00
albert
ba4052e831 fixes #75: History tags dont have a revert function 2011-09-15 18:57:50 -04:00
albert
c8afd34d15 added ip addr search 2011-07-29 18:04:50 -04:00
albert
e9bab19d51 changes 2011-06-29 13:06:25 -04:00