Commit 5ea96180 authored by Martin Lehoux's avatar Martin Lehoux

add moderation comments

parent c99f0d0e
......@@ -24,6 +24,10 @@
<div class="value">{{ online_comments_number }}</div>
<div class="label">Commentaires en ligne</div>
</div>
<div class="{% if moderation_comments_number > 0 %}orange {% endif %}statistic">
<div class="value">{{ moderation_comments_number }}</div>
<div class="label">Commentaires en modération</div>
</div>
<div class="statistic">
<div class="value">{{ online_documents_number }}</div>
<div class="label">Documents en ligne</div>
......
......@@ -608,6 +608,7 @@ def account(request):
# Select statistics
online_comments_number = len(request.user.coursecomment_set.filter(isModerated=True)) + len(request.user.documentcomment_set.filter(isModerated=True))
online_documents_number = len(request.user.document_set.filter(isAccepted=True)) # User doesn't have documents
moderation_comments_number = len(request.user.coursecomment_set.filter(isModerated=False)) + len(request.user.documentcomment_set.filter(isModerated=False))
# Count to_moderate_number to display on moderation menu tab
to_moderate_number = count_to_moderate()
......
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