From fe498e50d35dbb9ef4a91aee08e411be2586fe63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sun, 17 Apr 2016 14:22:05 +0200 Subject: [PATCH] skip users/services warning when removing an entity if there are none (#8747) --- src/authentic2/manager/templates/authentic2/manager/ou_delete.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/authentic2/manager/templates/authentic2/manager/ou_delete.html b/src/authentic2/manager/templates/authentic2/manager/ou_delete.html index dba86fd..e99d7b2 100644 --- a/src/authentic2/manager/templates/authentic2/manager/ou_delete.html +++ b/src/authentic2/manager/templates/authentic2/manager/ou_delete.html @@ -12,7 +12,10 @@ {% csrf_token %}
{% block caption %} -

{% blocktrans with user_count=object.user_set.count service_count=object.service_set.count %}There are currently {{ user_count }} users and {{ service_count }} services in this organizational unit. They will all be deleted. Are you sure you want to delete organizational unit "{{ object }}" ?{% endblocktrans %}

+ {% if object.user_set.count or object.service_set.count %} +

{% blocktrans with user_count=object.user_set.count service_count=object.service_set.count %}There are currently {{ user_count }} users and {{ service_count }} services in this organizational unit. They will all be deleted.{% endblocktrans %} + {% endif %} +

{% blocktrans %}Are you sure you want to delete organizational unit "{{ object }}"?{% endblocktrans %}

{% endblock %}
-- 2.8.0.rc3