From 827c0b7ed33b8b23745db032361d31dab5b6f5a4 Mon Sep 17 00:00:00 2001 From: Sam Splunks <72095718+samsplunks@users.noreply.github.com> Date: Fri, 2 Feb 2024 15:40:08 +0100 Subject: [PATCH] Update public ticket view with new settings statuses logic --- .../helpdesk/public_view_ticket.html | 40 +++++++------------ 1 file changed, 15 insertions(+), 25 deletions(-) diff --git a/helpdesk/templates/helpdesk/public_view_ticket.html b/helpdesk/templates/helpdesk/public_view_ticket.html index cdca2de7..8c1dac4a 100644 --- a/helpdesk/templates/helpdesk/public_view_ticket.html +++ b/helpdesk/templates/helpdesk/public_view_ticket.html @@ -107,33 +107,23 @@ {% if not ticket.can_be_resolved %}
{% trans "This ticket cannot be resolved or closed until the tickets it depends on are resolved." %}
{% endif %} {% if ticket.status == 1 %} - - {% endif %} - {% if ticket.status == 2 %} + + {% else %}
- - - - + {% for status_choice in ticket.STATUS_CHOICES %} + {% with status_choice_strfmt_s=status_choice.0|stringformat:"s" %} + {% if ticket.status == 2 and status_choice_strfmt_s in "1" %}{% else %} + {% if ticket.status == 3 and status_choice_strfmt_s not in "2,3,4" %}{% else %} + {% if ticket.status == 4 and status_choice_strfmt_s not in "2,4" %}{% else %} + {% if ticket.status == 5 and status_choice_strfmt_s not in "2,5" %}{% else %} + + {% endif %} + {% endif %} + {% endif %} + {% endif %} + {% endwith %} + {% endfor %}
- {% endif %} - {% if ticket.status == 3 %} -
- - - -
- {% endif %} - {% if ticket.status == 4 %} -
-
- {% endif %} - {% if ticket.status == 5 %} -
- - -
- {% endif %}