Commit Graph

46 Commits

Author SHA1 Message Date
evazion
ffdd5e6128 posts: make post votes work the same way as comment votes.
Change post votes to work the same way as comment votes:

* Make the upvote arrow blue if you've upvoted the post, or grey if you
  haven't. Likewise for the downvote arrow.
* Make it so you can click the upvote or downvote arrows to undo the vote.
* Don't show any notices when you vote on a post.

Also fix it so that votes work the same way on the posts page, the
comments page, and in the modqueue. Before it wasn't possible to undo
votes on the comments page or in the modqueue.
2021-01-29 02:21:08 -06:00
evazion
11a8c2877b favorites: refactor favlist order on post page.
On the posts show page, in the favorites list, show favorites according
to the order they were added to the favorites table, rather than the
order they were added to the posts's fav_string.

On most posts these should be the same, but on old posts they may be
slightly different. The IDs of the first few hundred thousand favorites
don't appear to be in chronological order. Probably the original
favorite IDs were lost and recreated by a database move at some point in
Danbooru's history. The fav_string is also inconsistent with the
favorites table in some places (one contains favorites that aren't
contained by the other), which also throws off the order.

Partially addresses #4562 by eliminating one place where we depended on
the fav_string.
2021-01-03 19:15:17 -06:00
lllusion3469
eb564a4ef2 Show or hide post vote buttons when (un)favoriting
When favoriting/unfavoriting a post, it would also be upvoted/"un"voted
but the upvote/downvote/undo vote buttons would stay shown/hidden as
they were before unlike when pressing those buttons.

For example when you want change from favorite to merely upvoted you
would have to reload the page in between.
2020-04-07 02:15:21 +02:00
evazion
a5418abb31 pundit: convert posts to pundit. 2020-03-20 18:03:01 -05:00
evazion
b77eebf136 /favorites: replace favorites view with ordfav: search.
Make /favorites redirect to a ordfav:<user> search instead of having a
separate view just for favorites. This duplicated a lot of code for no
good reason.
2019-08-31 19:58:38 -05:00
evazion
e000bdb861 js: drop jquery-timeout plugin.
Replace with `Danbooru.Utility.delay`.
2019-08-14 01:46:44 -05:00
Albert Yi
035a0026cd fixes #4050 2019-01-22 15:14:10 -08:00
Albert Yi
21a08d17a4 tweak styles for fav button 2018-10-24 10:02:50 -07:00
evazion
99632d5e8a TagSetPresenter: refactor to pass options explicitly.
Refactor tag_list_html, split_tag_list_html, and inline_tag_list_html to
take the `show_extra_links` and `current_query` options explicitly,
rather than implicitly relying on CurrentUser or taking `params[:tags]`
from the template.
2018-09-30 21:52:24 -05:00
Albert Yi
77d0c46b35 Merge pull request #3812 from evazion/feat-declarative-shortcuts
Add declarative keyboard shortcuts
2018-08-13 18:08:31 -07:00
evazion
bcaee199f5 favorites: unify create.js.erb & destory.js.erb code paths. 2018-08-12 15:51:18 -05:00
evazion
fb91bbc6c5 Fix #3813: Favorite limit can be bypassed. 2018-08-12 14:22:08 -05:00
evazion
bbaadda1e3 Convert keyboard shortcuts to use data-shortcut. 2018-08-12 12:09:58 -05:00
Albert Yi
718e641f51 remove similar users report 2018-08-03 17:40:00 -07:00
Albert Yi
6fa0ae2cf1 Migrate assets to use Webpacker 2018-07-27 15:24:05 -07:00
BrokenEagle
5cdd8d8f67 Standardize position of page title and secondary links
- Removed path specification for secondary links where unneeded
2017-12-28 10:20:27 -08:00
r888888888
bb228d5735 add favorite action underneath image 2017-09-05 14:41:33 -07:00
r888888888
e04a62b962 more crawler constraints 2016-02-05 14:17:26 -08:00
r888888888
873a978c2d link similar users 2016-01-07 17:28:14 -08:00
r888888888
bfceb8b388 fix missing tags_dom_id in partials 2015-07-16 18:07:17 -07:00
Toks
e6c4cd6c6d fixes #2014 2014-10-31 14:05:33 -04:00
Toks
07f3c1e655 fixes #1965 2013-09-06 10:32:54 -04:00
Toks
03aee0f664 Fix document title when viewing other users' favorites 2013-07-14 19:44:35 -04:00
Toks
ddfa019c4c fixes #1596 2013-05-11 18:00:28 -04:00
Toks
6ab405c142 fixes #1403 2013-05-03 19:54:01 -04:00
r888888888
d5f575159f rename references of privileged to gold 2013-04-28 00:04:52 -07:00
Toks
3ae84a9662 fixes #1343 2013-04-15 18:40:53 -04:00
Toks
c9400e404d fixes #449 2013-04-14 12:56:35 -04:00
albert
6933cfba26 fixes #972 2013-03-22 10:25:01 -07:00
小太
1a03a86592 Kill trailing whitespace in erb files 2013-03-19 23:11:58 +11:00
albert
9221e9ae9f fixes #952 2013-03-18 15:20:07 -07:00
albert
caacd3f86f fixes #733 2013-03-03 15:37:20 -05:00
albert
6a1db1197b fixes #670 2013-03-01 07:33:19 -08:00
albert
66fc05e30b change privileged accounts to gold accounts, add platinum accounts, add favorite and tag query limiting based on level 2013-02-20 00:02:43 -05:00
albert
8a66470975 enable blacklists in comments, wiki pages 2013-02-18 19:11:30 -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
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
739e28919a refactoring 2011-06-25 19:31:39 -04:00
albert
2f1fdcb459 more work on paginators 2011-06-21 14:32:07 -04:00
albert
42627be1d3 moved out search pages 2011-03-15 19:19:49 -04:00
albert
9c0a961ab2 major refactoring of javascripts 2011-03-10 17:59:42 -05:00
albert
6d0157265c pool views 2011-02-25 17:41:00 -05:00
albert
39dd2e277a * Refactored PostSet, splitting it into PostSets::Post and PostSets::Favorite
* Additional functional tests
2010-12-01 17:21:05 -05:00
albert
c6304c6e08 views 2010-11-19 16:24:17 -05:00