Commit f8f7a964 authored by Deimos's avatar Deimos

Show Exemplary badge on labeled comments

This starts showing the Exemplary badge to all users again (but only the
author can see the count still).

It also changes the "priority" of the .is-comment-exemplary and
.is-comment-new classes so that the stripe will show the new color when
a comment is both new and exemplary.
parent 3a18be64
......@@ -645,6 +645,12 @@ body {
border-left-color: var(--stripe-mine);
}
.is-comment-exemplary {
> .comment-itself {
border-left-color: var(--comment-label-exemplary);
}
}
.is-comment-new {
> .comment-itself {
border-left-color: var(--alert);
......@@ -655,12 +661,6 @@ body {
}
}
.is-comment-exemplary {
> .comment-itself {
border-left-color: var(--comment-label-exemplary);
}
}
.is-message-mine,
.is-topic-mine {
border-left-color: var(--stripe-mine);
......
......@@ -103,17 +103,21 @@
<div class="comment-votes">{{ pluralize(comment.num_votes, "vote") }}</div>
{% endif %}
{% if comment.is_label_active("exemplary") and request.has_permission("view_exemplary_reasons", comment) %}
<details class="comment-exemplary-reasons">
<summary><span class="label label-comment label-comment-exemplary">Exemplary</span>
<span class="comment-label-count">x{{ comment.label_counts["exemplary"] }}</span>
</summary>
<ul>
{% for label in comment.labels if label.name == "exemplary" %}
<li>"{{ label.reason }}"</li>
{% endfor %}
</ul>
</details>
{% if comment.is_label_active("exemplary") %}
{% if request.has_permission("view_exemplary_reasons", comment) %}
<details class="comment-exemplary-reasons">
<summary><span class="label label-comment label-comment-exemplary">Exemplary</span>
<span class="comment-label-count">x{{ comment.label_counts["exemplary"] }}</span>
</summary>
<ul>
{% for label in comment.labels if label.name == "exemplary" %}
<li>"{{ label.reason }}"</li>
{% endfor %}
</ul>
</details>
{% else %}
<ul class="comment-labels"><li class="label label-comment label-comment-exemplary">Exemplary</li></ul>
{% endif %}
{% endif %}
{% if comment.label_counts and request.has_permission("view_labels", comment) %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment