Commit Graph

58 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
b85b4b190a pagination: remove switch_to_sequential option. 2020-06-28 02:59:32 -05: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
7b1efd1204 Rework artist versions index view
- Added a changes column explicitly listing all of the changes
-- This makes it more in line with the other version views now
- Does a symmetric difference on the array fields to detect changes
2020-02-08 22:57:29 +00:00
evazion
6b066f2cab Fix #4275: Unable to update "banned artist" entries.
Allow all users to view and edit artist entries and wiki pages belonging
to banned artists. There was little need to hide these pages from
Members, it was mainly to appease artists who didn't like us even
linking to their sites.

These restrictions also had multiple flaws:

* Banned artist information was still visible in the API.
* It was still possible to edit banned artists using the API.
* It was still possible for unprivileged users to revert banned
  artist entries or wiki pages to previous versions.
* The restrictions were inconsistent: in various places they were
  either Member-only, Gold-only, or Builder-only.
2020-01-31 02:43:08 -06: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
0c92a5af4d /artist_versions: fix stray <td> tag. 2020-01-08 11:53:28 -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
043944e1dd Convert index tables to using table builder 2020-01-04 22:02:43 +00:00
evazion
a5ef86bbe8 views: add html ids for main menu and subnav menu.
Also refactor secondary links to put the <menu> element in the default
layout instead of in each _secondary_links partial.
2019-09-17 00:28:41 -05:00
evazion
a1b48f5e3f views: migrate search forms to use simple form.
Migrate various forms to be built using simple form instead of raw html.
Also adds autocomplete="off" to these forms (#4162).
2019-09-10 14:33:18 -05:00
evazion
f151285038 views: standardize page titles. 2019-08-24 22:55:35 -05:00
evazion
59b277ead1 users: drop id_to_name, name_to_id caching.
Changes:

* Drop Users.id_to_name.
* Don't cache Users.name_to_id.
* Replace calls to name_to_id with find_by_name when possible.
* Don't autodefine creator_name in belongs_to_creator.
* Don't autodefine updater_name in belongs_to_updater.
* Instead manually define creator_name / updater_name only on models that need
  to return these fields in the api.

id_to_name was cached to reduce the impact of N+1 query patterns in
certain places, especially in api responses that return creator_name /
updater_name fields. But it still meant we were doing N calls to
memcache. Using `includes` to prefetch users avoids this N+1 pattern.

name_to_id had no need be cached, it was never used in any performance-
sensitive contexts.

Avoiding caching also avoids the need to keep these caches consistent.
2019-08-18 11:24:42 -05:00
evazion
fa19047220 autocomplete: add username autocompletion sitewide. 2019-08-11 15:38:39 -05:00
evazion
61f6de5ff3 artist versions: rearrange layout to better fit small screens.
* Move group name beneath the artist name.
* Replace 'Active' column with '(deleted)' notice next to artist name.
* Combine updater, updated at, and ip address fields in single column.
* Combine templates for standard listing and revert listing (only
  difference is presense of 'Revert to' column).
2018-12-10 00:30:05 -06:00
evazion
47e26419d3 nav menu: add html ids to secondary nav menu links (#3844). 2018-08-27 20:57:59 -05:00
evazion
ad056e69d5 utility.js: simplify even/odd table row striping. 2018-08-17 16:25:36 -05:00
evazion
962842815d autocomplete: move artist/pool/wiki autocompletion to autocomplete.js.
* Move all autocomplete code to autocomplete.js.

* Mark autocompleted fields with `data-autocomplete="<type>"` attributes,
  instead of hardcoding input field IDs in the javascript.
2018-02-18 19:22:17 -06:00
BrokenEagle
2e6f216e10 Fix spacing issues on versions
- Removed pipe character '|' on post version standard listing
2018-01-02 22:50:25 -08:00
BrokenEagle
613beee375 Differentiate version views with reversion links 2018-01-01 19:36:27 -08:00
evazion
9bf85ee2b3 Factor out <ins>/<del> css from #c-post-versions to .diff-list. 2017-05-20 12:07:47 -05:00
evazion
bdf3366bcf Link IP addresses to IP searches. 2017-01-12 09:15:14 +00:00
r888888888
b8f14b6fee hide more pages for banned artists #2132 2016-01-27 17:06:13 -08:00
Toks
36da788503 fixes #2475 2015-08-26 11:40:28 -04:00
r888888888
1d9596d7f2 fixes #2417 2015-06-29 18:17:59 -07:00
r888888888
fad0ab7c93 fixes #2133 2014-04-16 17:43:34 -07:00
ghostrigger
bde84342f8 for #1896
modify Artists to Listing in /artist_versions
2013-07-27 00:12:59 +08:00
Toks
88afa23223 Standardize ip address visibility; fixes #1203 2013-07-11 21:05:56 -04:00
Toks
3134bee7f9 fixes #1711 2013-06-11 10:22:08 -04:00
r888888888
6ef50f7a7f potential fix for #993 2013-05-29 18:13:13 -07:00
Toks
77dfd91702 fixes #1658; fixes #1592 2013-05-25 19:49:19 -04:00
Toks
c250501bc4 add artist version search 2013-05-17 14:46:00 -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
Toks
7e3324b5f0 fixes #858
adds color coding to both urls and other names on artist versions
2013-03-29 09:59:14 -04:00
albert
8bfd7b408f remove links that are not usable by anon users, fixes #977 2013-03-22 10:18:05 -07:00
albert
a7103032d6 fixes #1017 2013-03-21 17:19:46 -07:00
albert
bd6c8a5e90 fixes #957 2013-03-18 16:41:09 -07:00
albert
0595019958 change relative times to absolute on listings 2013-03-13 16:25:08 -04:00
albert
9446343bd7 fixes #838 2013-03-12 12:53:24 -04:00
albert
42d7caae25 link to artist in artist version listing 2013-02-22 16:06:03 -05:00
albert
78f1d0f69a fixes to user search 2013-02-21 12:42:41 -05:00
albert
c5731298fb clarify post deletion/flag logic 2013-02-19 22:03:01 -05:00
albert
9e6a25f844 add ubiquitous time tags 2013-01-22 15:28:12 -05:00
albert
34ae712be0 fixed titles 2011-10-23 16:55:57 -04:00