Browse Source

Apply proper styling to comments that are both new and by OP

Fixes #371.

Adds `.is-comment-by-op` class even if the comment is new or by
the current user.  This fixes the bolding of the "(OP)" tag and
preserves the colors from `new` or `mine`, which have priority
over `op` due to their ordering in `_comment.scss`.
merge-requests/145/head
Aeledfyr 12 months ago
committed by Deimos
parent
commit
5081b86140
  1. 4
      tildes/tildes/templates/macros/comments.jinja2

4
tildes/tildes/templates/macros/comments.jinja2

@ -255,7 +255,9 @@
{# done as an elif so we never mark a user's own comments as "new" #}
{% elif mark_newer_than and comment.created_time > mark_newer_than %}
{% do classes.append('is-comment-new') %}
{% elif request.has_permission('view_author', comment.topic) and request.has_permission("view", comment) and comment.user == comment.topic.user %}
{% endif %}
{% if request.has_permission('view_author', comment.topic) and request.has_permission("view", comment) and comment.user == comment.topic.user %}
{% do classes.append('is-comment-by-op') %}
{% endif %}

Loading…
Cancel
Save