show number of held emails in backoffice menu
This commit is contained in:
parent
71e393cfe6
commit
226bbca220
|
@ -141,7 +141,11 @@
|
||||||
</a>
|
</a>
|
||||||
<a href="{% url 'backoffice:outgoing_email_release' camp_slug=camp.slug %}" class="list-group-item">
|
<a href="{% url 'backoffice:outgoing_email_release' camp_slug=camp.slug %}" class="list-group-item">
|
||||||
<h4 class="list-group-item-heading">Edit and Release Held Emails</h4>
|
<h4 class="list-group-item-heading">Edit and Release Held Emails</h4>
|
||||||
<p class="list-group-item-text">Use this view to edit and release OutgoingEmailQueue objects on hold.</p>
|
{% if held_email_count %}
|
||||||
|
<p class="list-group-item-text">Use this view to edit and release <span class="label label-warning">{{ held_email_count }}</span> OutgoingEmailQueue objects on hold.</p>
|
||||||
|
{% else %}
|
||||||
|
<p class="list-group-item-text">No emails are currently held for release. Check back later!</p>
|
||||||
|
{% endif %}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -98,6 +98,7 @@ class BackofficeIndexView(CampViewMixin, RaisePermissionRequiredMixin, TemplateV
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
context["held_email_count"] = OutgoingEmail.objects.filter(hold=True, responsible_team__isnull=True).count() + OutgoingEmail.objects.filter(hold=True, responsible_team__camp=self.camp).count()
|
||||||
return context
|
return context
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue