]> git.openstreetmap.org Git - osqa.git/commitdiff
OSQA-236, now we add a link for the administrators to flagged posts management tool...
authorjordan <jordan@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Sun, 27 Mar 2011 16:19:03 +0000 (16:19 +0000)
committerjordan <jordan@0cfe37f9-358a-4d5e-be75-b63607b5c754>
Sun, 27 Mar 2011 16:19:03 +0000 (16:19 +0000)
git-svn-id: http://svn.osqa.net/svnroot/osqa/trunk@899 0cfe37f9-358a-4d5e-be75-b63607b5c754

forum/management/commands/send_email_alerts.py
forum/skins/default/templates/notifications/digest.html

index 85b83fae6e9be646e61dd266886454e7b4877893..02e2df0b6b4364f45b611c0c830a72366a08b1e6 100644 (file)
@@ -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
index 5c5737514046a49295a2d8a32262412bd825eb02..0c01f60020fa0f099b0c2d8a1478269f176aa3a9 100644 (file)
 
         {% endif %}
 
+        {% if recipient.is_superuser %}
+        {% declare %}
+            flagged_url = html.hyperlink(app_url + reverse('admin_flagged_posts'), str(flagged_count) + ' ' + _('posts'), style=a_style)
+        {% enddeclare %}
+        <p style="{{ p_style }}">
+            {% blocktrans %}
+            {{ flagged_url }} have been marked as flagged.
+            {% endblocktrans %}
+        </p>
+        {% endif %}
+
     {% endhtmlcontent %}
 
     {% textcontent notifications/base_text.html %}