diff --git a/helpdesk/templates/helpdesk/ticket.html b/helpdesk/templates/helpdesk/ticket.html index b3d814c0..50a61a4f 100644 --- a/helpdesk/templates/helpdesk/ticket.html +++ b/helpdesk/templates/helpdesk/ticket.html @@ -109,39 +109,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 %}
- - - - + {% for status_choice in ticket.STATUS_CHOICES %} + {% with status_choice_strfmt_s=status_choice.0|stringformat:"s" %} + {% if ticket.status == 1 and status_choice_strfmt_s in "2" %}{% else %} + {% 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 %} + {% endif %} + {% endwith %} + {% endfor %}
- {% endif %} - {% if ticket.status == 2 %} -
- - - - -
- {% endif %} - {% if ticket.status == 3 %} -
- - - -
- {% endif %} - {% if ticket.status == 4 %} -
-
- {% endif %} - {% if ticket.status == 5 %} -
- - -
- {% endif %} {% if helpdesk_settings.HELPDESK_UPDATE_PUBLIC_DEFAULT %}