Fix pluralisation of comment(s) in tracker

See https://todo.sr.ht/~sircmpwn/todo.sr.ht/187
This commit is contained in:
Jonas Mueller 2019-08-02 19:43:57 +02:00 committed by Drew DeVault
parent b6a71ec939
commit b961b8adbf
2 changed files with 20 additions and 12 deletions

View File

@ -118,10 +118,10 @@ select.form-control {
.comments {
text-align: left !important;
}
.comments:after {
content: "comments";
& > .label {
display: inline;
}
}
}
@ -137,6 +137,9 @@ select.form-control {
&.comments {
text-align: center;
& > .label {
display: none;
}
}
@for $i from 1 through 5 {

View File

@ -161,17 +161,22 @@
{{ ticket.submitter }}
</a>
</div>
{% if ticket.id in seen_ticket_ids %}
<div class="comments">
{{icon("comments-o")}}
{{ comment_counts.get(ticket.id, 0) }}
<span class="icon">
{% if ticket.id in seen_ticket_ids %}
{{icon("comments-o")}}
{% else %}
{{icon("comments")}}
{% endif %}
</span>
<span class="count">
{{ comment_counts.get(ticket.id, 0) }}
</span>
<span class="label">
{{ "comment" if comment_counts.get(ticket.id, 0) == 1
else "comments" }}
</span>
</div>
{% else %}
<div class="comments">
{{icon("comments")}}
{{ comment_counts.get(ticket.id, 0) }}
</div>
{% endif %}
{% endfor %}
</div>
{% else %}