Commit Graph

40 Commits

Author SHA1 Message Date
evazion
be36968b6d Fix #3351: Mod+: Treat deleted comments as below score threshold.
Comments have three states: visible, hidden, and invisible. Visible
comments are always shown. Hidden comments are not shown until the user
clicks 'Show all comments'. Invisible comments are never shown to the
user. Deleted comments are treated as hidden for moderators and
invisible for normal users. Thresholded comments are treated as hidden
for all users.
2019-08-31 16:24:44 -05:00
evazion
a3d748e300 Fix #4145: Unable to view deleted comments from post page.
Bug: if all the comments on a post were deleted then the deleted
comments wouldn't be visible to moderators.

This was because we assumed that if `last_commented_at` was nil it meant
that the post had no comments, but this was wrong. `last_commented_at`
only counts undeleted comments. It's reset to nil if all the commnets
have been deleted.
2019-08-26 13:50:42 -05:00
evazion
b283281e5e comments: minimize sql queries.
Certain parts of comment rendering triggered sql queries that we didn't
really need to do. Rework things to avoid this.

* Preload comment creators in order to display commenter names with link_to_user.

* Preload comment votes in order to display "undo vote" links. Only preload
  votes for members since anonymous users can't vote and don't have "undo
  vote" links.

* Rework various conditionals to do the filtering in Ruby so that we
  avoid issuing any extra queries in sql.

* Avoid issuing any queries at all when the post doesn't have any
  comments (when last_commented_at is blank).
2019-08-20 21:55:25 -05: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
evazion
dfb7cf6994 comments: add standalone new comment form.
Add standalone /comments/new page to allow commenting if javascript is
disabled.
2018-09-29 20:42:38 -05:00
evazion
130570aa33 comments.js: fix thresholded comments.
* Restore behavior of thresholded comments being greyed out (lost in 6fa0ae2cf).

* Set the `below-threshold` class for thresholded comments in the html instead of in javascript.

* Remove `include_below_threshold` param; it was always true when clicking "Show all comments".
2018-08-09 14:45:26 -05:00
evazion
8e8a39af43 comments.js: fix forms flickering on page load.
Mark the edit form, new comment form, and unvote links as hidden in
html, instead of showing them by default then hiding them later in
Javascript. This eliminates flickering on page load.
2018-08-09 14:44:20 -05:00
Albert Yi
7b74f5caf6 switch to using thumbs for voting 2018-07-06 11:02:14 -07:00
Albert Yi
6c790c61d3 replace uploader information post previews and comment listing, rename tagger to top tagger 2018-03-27 10:49:41 -07:00
evazion
b80976bce7 modqueue: link tags, like they are in /comments. 2017-02-24 21:03:14 -06:00
evazion
1257639109 Add 'post as moderator' option for comments.
* Add 'post as moderator' option to comment form. This creates a so-called sticky comment.
* Downvotes have no effect on stickied comments; they're always visible, regardless of comment thresholds.
* Only mods may sticky comments.
* Mods may sticky comments by other users.
2016-12-26 23:52:45 -06:00
evazion
7c838f8525 Delete unused /comments/index_all route and unused _threshold.html.erb template. 2016-12-26 23:52:27 -06:00
r888888888
6d6d00b190 expose voting to non-gold supervoters 2016-03-14 16:52:49 -07:00
r888888888
d5f575159f rename references of privileged to gold 2013-04-28 00:04:52 -07:00
Toks
4f16cdf145 fixes #1295 2013-04-13 15:19:04 -04:00
Toks
8b33cac661 replace old user links with new format 2013-04-04 23:16:28 -04:00
Toks
6746d67e31 adds user level classes to comment index by post 2013-04-04 19:10:02 -04:00
albert
ec50911a52 Merge branch 'master' of github.com:r888888888/danbooru 2013-03-22 18:14:42 -04:00
albert
8bfd7b408f remove links that are not usable by anon users, fixes #977 2013-03-22 10:18:05 -07:00
Moebius-Strip
f483f59786 Typo causing a misplaced percent sign in the HTML
I know nothing about eRuby, but there's definitely a random percent sign showing up in the HTML and this looks like the culprit to me.
2013-03-22 02:16:51 -03:00
小太
1a03a86592 Kill trailing whitespace in erb files 2013-03-19 23:11:58 +11:00
albert
85ab986a01 fixes #657 2013-02-28 17:37:23 -08:00
albert
09c5791309 fixes #551 2013-02-23 12:55:10 -05:00
albert
7bca79e71a fixesg 2013-01-14 11:23:43 -05:00
albert
fd300ad346 fixes #203 2012-01-06 18:37:08 -05:00
albert
746901357a fix coloring for tags 2011-12-07 16:53:48 -05:00
albert
25090af792 fixed show all comments link not showing for comments > 6 posts 2011-10-15 13:03:50 -04:00
albert
b817da8d82 changes to comment expansion link in comment listing 2011-09-14 17:55:32 -04:00
albert
e8d16b2b33 fixes #25: Voting on posts does not have any effect (also added to post/show) 2011-09-13 18:08:38 -04:00
albert
281cb75991 fix 2011-09-11 17:03:36 -04:00
albert
3395c97c65 fixed comment hiding 2011-09-11 16:40:58 -04:00
albert
24bf21540a refactoring views 2011-08-16 18:47:01 -04:00
albert
9e287726e3 work 2011-05-29 03:47:06 -04:00
albert
42627be1d3 moved out search pages 2011-03-15 19:19:49 -04:00
albert
d0d3487fc8 converted haml templates 2010-10-28 20:11:17 -04:00
albert
fc0a076aca * Missing files
* Work on post exploration code by traversing dates
2010-10-27 20:16:43 -04:00
albert
484ff696e2 fixed jrails, fixed deprecation warnings 2010-10-27 13:40:50 -04:00
albert
f8b1bd3142 work on comments 2010-10-20 19:24:53 -04:00
albert
f051e04550 sync 2010-10-08 18:42:26 -04:00
albert
23656e3fa9 * Continued work on improving post view templates
* Added statistics-based estimator for related tag calculator
* Fleshed out IpBan class based on changes to Danbooru 1.xx
2010-04-29 17:32:15 -04:00