Commit Graph

21 Commits

Author SHA1 Message Date
evazion
4878ecffe8 /wiki_page_versions/diff: fix regression in 5a790ee25. 2021-03-12 23:31:50 -06:00
evazion
5a790ee25a wiki pages: remove category_name field from API.
Remove the `category_name` field from the `/wiki_page.json` API. This
field was originally added only because it was needed by our autocomplete
Javascript. It was also misnamed, it wasn't the tag's category name, it
was the category's ID.

Users should use `https://danbooru.donmai.us/wiki_pages.json?only=title,tag`
instead if they need this.

This triggered a N+1 query pattern when dumping wiki pages to BigQuery,
which made dumping wiki pages very slow. It also meant this field was
included in the database dump, even though it wasn't a real database
column.
2021-03-10 03:08:49 -06: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
de1324098d Rework wiki page versions index/diff views
- Changed to using the diff-body CSS class
-- Removed unnecessary elements from the CSS style file
- Does a symmetric difference on the array fields to detect differences
- Add more descriptors to the status/changes column
- Specifically add <br> to statuses to cause line breaks
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
evazion
6a984de3d5 views: refactor page titles.
Refactor `page_title` helper to automatically include site name.
2020-01-25 01:52:18 -06:00
evazion
90b94adee8 /wiki_page_versions/diff: use SetDiff to diff other_names.
Use SetDiff instead of DiffBuilder to generate diffs for wiki page other
names. SetDiff is what we use for artist other names.
2020-01-12 16:31:23 -06:00
BrokenEagle
4ab90e5d6e Move diff logic out of helper 2020-01-07 18:48:50 +00:00
evazion
960e5d4ae0 views: factor out sidebar layout template.
* Factor out common sidebar layout template.
* Convert wiki pages and posts to use this template.
* Add data-layout attribute to <body> element indicating the current layout.
2019-09-28 17:50:10 -05:00
evazion
d46aa89159 /wiki_page_versions: change page wrapper id to #c-wiki-page-versions.
Changes the wrapper id to #c-wiki-page-versions and moves the
corresponding css from wiki_pages.scss to wiki_page_versions.scss.
2017-05-19 13:40:24 -05:00
r888888888
b8f14b6fee hide more pages for banned artists #2132 2016-01-27 17:06:13 -08:00
Toks
424eb40c9d fixes #2240 2014-08-12 12:41:10 -04:00
Toks
c4f7d4d389 Fix wiki version date display bug for old edits
It seems that in Danbooru 1 wiki page version's created_at was always
the initial created_at of the wiki page itself, as opposed to the time
that the edit was made like in Danbooru 2.
2014-07-22 00:33:39 -04:00
Toks
b18bb73f4b Implentation for #2141 2014-05-22 20:07:15 -04:00
Toks
b600a5bcb0 fix regression
@wiki_page wasn't defined by the wiki page versions controller;
@thispage and @otherpage were instead
2013-05-10 15:45:43 -04:00
ghostrigger
f6820108ee fixes #1591 hopefully
adds wiki title on document's title when comparing wiki versions
2013-05-11 02:57:01 +08:00
r888888888
d5f575159f rename references of privileged to gold 2013-04-28 00:04:52 -07:00
Toks
8e29fa9f49 user links for wiki page diff 2013-04-17 11:22:10 -04:00
albert
fb21db2774 fixes #816 2013-03-09 12:59:09 -05:00
albert
81c9ba22a7 add wiki diff 2013-02-23 20:08:20 -05:00