Optimize actionbar comment
This commit is contained in:
parent
d2f261acfe
commit
9b5f0c0969
2 changed files with 3 additions and 2 deletions
|
@ -184,5 +184,6 @@ class CommentedDetailView(TemplateResponseMixin, SingleObjectMixin, View):
|
|||
).exists()
|
||||
)
|
||||
context["comment_list"] = queryset
|
||||
context["comment_count"] = len(queryset)
|
||||
context["vote_hide_threshold"] = settings.DMOJ_COMMENT_VOTE_HIDE_THRESHOLD
|
||||
return context
|
||||
|
|
|
@ -27,9 +27,9 @@
|
|||
<span class="actionbar-text">
|
||||
{{_("Comment")}}
|
||||
</span>
|
||||
{% if comment_list.count() %}
|
||||
{% if comment_count %}
|
||||
<span style="margin-left: 0.2em">
|
||||
({{comment_list.count()}})
|
||||
({{comment_count}})
|
||||
</span>
|
||||
{% endif %}
|
||||
</span>
|
||||
|
|
Loading…
Reference in a new issue