From 722e2e4050b19c363a3ea13337d7fbc7a4bc7551 Mon Sep 17 00:00:00 2001
From: Jens Langhammer
- - {{ policy_count }} - + {% if policies_without_attachment > 0 %} + + {{ policy_count }} + {% else %} + {{ policy_count }} + {% endif %}
{% trans 'Name' %} | {% trans 'Type' %} | @@ -35,7 +36,14 @@ | |
---|---|---|---|
+ {% if not policy.policymodel_set.exists %} + + {% else %} + + {% endif %} + | {{ policy.name }} | {{ policy|verbose_name }} | diff --git a/passbook/admin/views/overview.py b/passbook/admin/views/overview.py index ce32338a7..d2bca417f 100644 --- a/passbook/admin/views/overview.py +++ b/passbook/admin/views/overview.py @@ -24,4 +24,5 @@ class AdministrationOverviewView(AdminRequiredMixin, TemplateView): kwargs['version'] = __version__ kwargs['worker_count'] = len(CELERY_APP.control.ping(timeout=0.5)) kwargs['providers_without_application'] = Provider.objects.filter(application=None) + kwargs['policies_without_attachment'] = len(Policy.objects.filter(policymodel__isnull=True)) return super().get_context_data(**kwargs) |