From 0f103ea8274f8e2f98ef6412d2b30f5b74b72feb Mon Sep 17 00:00:00 2001 From: Stefano Brentegani Date: Mon, 21 Jul 2014 20:28:37 +0200 Subject: [PATCH] use for ... empty in templates --- helpdesk/templates/helpdesk/dashboard.html | 10 ++++------ helpdesk/templates/helpdesk/email_ignore_list.html | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/helpdesk/templates/helpdesk/dashboard.html b/helpdesk/templates/helpdesk/dashboard.html index 1c340952..4e500bf6 100644 --- a/helpdesk/templates/helpdesk/dashboard.html +++ b/helpdesk/templates/helpdesk/dashboard.html @@ -85,10 +85,9 @@ {{ ticket.get_status }} {{ ticket.modified|timesince }} -{% endfor %} -{% if not user_tickets %} +{% empty %} {% trans "You have no tickets assigned to you." %} -{% endif %} +{% endfor %} @@ -107,10 +106,9 @@ {{ ticket.created|timesince }} ago {% trans "Take" %} | {% trans "Delete" %} -{% endfor %} -{% if not unassigned_tickets %} +{% empty %} {% trans "There are no unassigned tickets." %} -{% endif %} +{% endfor %} diff --git a/helpdesk/templates/helpdesk/email_ignore_list.html b/helpdesk/templates/helpdesk/email_ignore_list.html index b2ba0b5c..ebf82989 100644 --- a/helpdesk/templates/helpdesk/email_ignore_list.html +++ b/helpdesk/templates/helpdesk/email_ignore_list.html @@ -18,7 +18,7 @@ {{ ignore.name }} {{ ignore.email_address }} {{ ignore.date }} - {% for queue in ignore.queues.all %}{{ queue.slug }}{% if not forloop.last %}, {% endif %}{% endfor %}{% if not ignore.queues.all %}{% trans "All" %}{% endif %} + {% for queue in ignore.queues.all %}{{ queue.slug }}{% if not forloop.last %}, {% endif %}{% empty %}{% trans "All" %}{% endfor %} {% if ignore.keep_in_mailbox %}{% trans "Keep" %}{% endif %} {% trans "Delete" %}