From 58a5387779050beefe5fdcacda8a5a3579255dc7 Mon Sep 17 00:00:00 2001 From: bbe Date: Fri, 23 Oct 2020 16:24:35 +0200 Subject: [PATCH] Show Due date on public view ticket if it is set. Also change default to empty string when a custom field value is None. --- .../templates/helpdesk/public_view_ticket.html | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/helpdesk/templates/helpdesk/public_view_ticket.html b/helpdesk/templates/helpdesk/public_view_ticket.html index 4e4d6a85..39b89e75 100644 --- a/helpdesk/templates/helpdesk/public_view_ticket.html +++ b/helpdesk/templates/helpdesk/public_view_ticket.html @@ -15,6 +15,13 @@ {{ ticket.created|date:"r" }} ({{ ticket.created|naturaltime }}) +{% if ticket.due_date %} + + {% trans "Due On" %} + {{ ticket.due_date|date:"r" }} ({{ ticket.due_date|naturaltime }}) + +{% endif %} + {% trans "Submitter E-Mail" %} {{ ticket.submitter_email }} @@ -26,10 +33,11 @@ {% for customfield in ticket.ticketcustomfieldvalue_set.all %} - - {{ customfield.field.label }} - {{ customfield.value }} -{% endfor %} + + {{ customfield.field.label }} + {{ customfield.value|default:"" }} + +{% endfor %} {% if tags_enabled %}