From: jordan Date: Sun, 27 Mar 2011 16:19:03 +0000 (+0000) Subject: OSQA-236, now we add a link for the administrators to flagged posts management tool... X-Git-Tag: live~397 X-Git-Url: https://git.openstreetmap.org./osqa.git/commitdiff_plain/15f6ccf06354856b10422407037320b4e064d727?ds=sidebyside OSQA-236, now we add a link for the administrators to flagged posts management tool in the daily digest. The number of the flagged items is shown too. git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@899 0cfe37f9-358a-4d5e-be75-b63607b5c754 --- diff --git a/forum/management/commands/send_email_alerts.py b/forum/management/commands/send_email_alerts.py index 85b83fa..02e2df0 100644 --- a/forum/management/commands/send_email_alerts.py +++ b/forum/management/commands/send_email_alerts.py @@ -98,6 +98,9 @@ class Command(NoArgsCommand): new_member_count = new_members.count() + # The number of the flagged content for the day + flagged_count = Flag.objects.all().count() + if new_member_count >= SHOW_N_MORE_ACTIVE_NEW_MEMBERS: new_members = new_members[:SHOW_N_MORE_ACTIVE_NEW_MEMBERS] show_all_users = True diff --git a/forum/skins/default/templates/notifications/digest.html b/forum/skins/default/templates/notifications/digest.html index 5c57375..0c01f60 100644 --- a/forum/skins/default/templates/notifications/digest.html +++ b/forum/skins/default/templates/notifications/digest.html @@ -90,6 +90,17 @@ {% endif %} + {% if recipient.is_superuser %} + {% declare %} + flagged_url = html.hyperlink(app_url + reverse('admin_flagged_posts'), str(flagged_count) + ' ' + _('posts'), style=a_style) + {% enddeclare %} +

+ {% blocktrans %} + {{ flagged_url }} have been marked as flagged. + {% endblocktrans %} +

+ {% endif %} + {% endhtmlcontent %} {% textcontent notifications/base_text.html %}