From 9e7b4ef9bfafbcc368bab6cd36265fe04d7b5b49 Mon Sep 17 00:00:00 2001 From: Benbb96 Date: Sat, 22 Apr 2023 23:20:41 +0200 Subject: [PATCH] Reformat file ticket_desc_table.html --- .../templates/helpdesk/ticket_desc_table.html | 230 ++++++++++++------ 1 file changed, 149 insertions(+), 81 deletions(-) diff --git a/helpdesk/templates/helpdesk/ticket_desc_table.html b/helpdesk/templates/helpdesk/ticket_desc_table.html index 4a09a58b..ba980af5 100644 --- a/helpdesk/templates/helpdesk/ticket_desc_table.html +++ b/helpdesk/templates/helpdesk/ticket_desc_table.html @@ -10,111 +10,163 @@
- + + + {% trans "Edit" %} + + | + {% trans "Delete" %} + + | {% if ticket.on_hold %} + + {% csrf_token %} + + + {% else %} + + {% csrf_token %} + + + {% endif %} + + + {% for customfield in ticket.ticketcustomfieldvalue_set.all %} - - - - {% endfor %} + + + + + {% endfor %} - - - - - + {% if helpdesk_settings.HELPDESK_ENABLE_DEPENDENCIES_ON_TICKET != False and helpdesk_settings.HELPDESK_ENABLE_TIME_SPENT_ON_TICKET != False %} - - {% if helpdesk_settings.HELPDESK_ENABLE_DEPENDENCIES_ON_TICKET %} - - - {% else %} - - - {% endif %} - {% if helpdesk_settings.HELPDESK_ENABLE_TIME_SPENT_ON_TICKET %} - - - {% else %} - - - {% endif %} - + + {% if helpdesk_settings.HELPDESK_ENABLE_DEPENDENCIES_ON_TICKET %} + + + {% else %} + + + {% endif %} + {% if helpdesk_settings.HELPDESK_ENABLE_TIME_SPENT_ON_TICKET %} + + + {% else %} + + + {% endif %} + {% endif %} {% if ticket.kbitem %} - - - - + + + + {% endif %} @@ -122,18 +174,34 @@ + {{ ticket.get_markdown|urlizetrunc:50|num_to_link }} + - {% if ticket.resolution %} - - - - - {% endif %} + {% if ticket.resolution %} + + + + + + + {% endif %}

{{ ticket.queue.slug }}-{{ ticket.id }}. {{ ticket.title }} [{{ ticket.get_status }}]

+
+

{{ ticket.queue.slug }}-{{ ticket.id }}. {{ ticket.title }} [{{ ticket.get_status }}]

{% blocktrans with ticket.queue as queue %}Queue: {{ queue }}{% endblocktrans %} - - | - | - {% if ticket.on_hold %} -
- {% csrf_token %} - -
- {% else %} -
- {% csrf_token %} - -
- {% endif %} -
{{ customfield.field.label }}{% spaceless %}{% if "url" == customfield.field.data_type %}{{ customfield.value }} - {% elif "datetime" == customfield.field.data_type %}{{ customfield.value|datetime_string_format }} - {% elif "date" == customfield.field.data_type %}{{ customfield.value|datetime_string_format }} - {% elif "time" == customfield.field.data_type %}{{ customfield.value|datetime_string_format }} - {% else %}{{ customfield.value|default:"" }} - {% endif %}{% endspaceless %}
{{ customfield.field.label }} + {% spaceless %} + {% if "url" == customfield.field.data_type %} + {{ customfield.value }} + {% elif "datetime" == customfield.field.data_type %} + {{ customfield.value|datetime_string_format }} + {% elif "date" == customfield.field.data_type %} + {{ customfield.value|datetime_string_format }} + {% elif "time" == customfield.field.data_type %} + {{ customfield.value|datetime_string_format }} + {% else %} + {{ customfield.value|default:"" }} + {% endif %} + {% endspaceless %} +
{% trans "Due Date" %}{{ ticket.due_date|date:"DATETIME_FORMAT" }} {% if ticket.due_date %}({{ ticket.due_date|naturaltime }}){% endif %} + + {{ ticket.due_date|date:"DATETIME_FORMAT" }} + {% if ticket.due_date %}({{ ticket.due_date|naturaltime }}){% endif %} {% trans "Submitted On" %} {{ ticket.created|date:"DATETIME_FORMAT" }} ({{ ticket.created|naturaltime }})
{% trans "Assigned To" %}{{ ticket.get_assigned_to }}{% if _('Unassigned') == ticket.get_assigned_to %} - - {% endif %} + + {{ ticket.get_assigned_to }} + {% if _('Unassigned') == ticket.get_assigned_to %} + + + + {% endif %} {% trans "Submitter E-Mail" %} {{ ticket.submitter_email }} - {% if user.is_superuser %} {% if submitter_userprofile_url %}{% endif %} - - - - {% endif %} + + {{ ticket.submitter_email }} + {% if user.is_superuser %} + {% if submitter_userprofile_url %} + + + + {% endif %} + + + + + + + {% endif %}
{% trans "Priority" %}{{ ticket.get_priority_display }} + + {{ ticket.get_priority_display }} {% trans "Copies To" %}{{ ticketcc_string }} {% if SHOW_SUBSCRIBE %} {% endif %} + {{ ticketcc_string }} + + + + {% if SHOW_SUBSCRIBE %} + + + + {% endif %} +
{% trans "Dependencies" %} - - {% for dep in ticket.ticketdependency.all %} - {% if forloop.first %}

{% trans "This ticket cannot be resolved until the following ticket(s) are resolved" %}

{% endif %} - {% empty %} - {% trans "This ticket has no dependencies." %} - {% endfor %} -
{% trans "Total time spent" %}{{ ticket.time_spent_formated }}
{% trans "Dependencies" %} + + {% for dep in ticket.ticketdependency.all %} + {% if forloop.first %}

{% trans "This ticket cannot be resolved until the following ticket(s) are resolved" %}

{% endif %} + {% empty %} + {% trans "This ticket has no dependencies." %} + {% endfor %} +
{% trans "Total time spent" %}{{ ticket.time_spent_formated }}
{% trans "Knowlegebase item" %} {{ticket.kbitem}}
{% trans "Knowlegebase item" %} {{ticket.kbitem}}
{% trans "Attachments" %}
    {% for followup in ticket.followup_set.all %} - {% for attachment in followup.followupattachment_set.all %} -
  • {{ attachment.filename }} ({{ attachment.mime_type }}, {{ attachment.size|filesizeformat }}) - {% if followup.user and request.user == followup.user %} - - {% endif %} -
  • - {% endfor %} + {% for attachment in followup.followupattachment_set.all %} +
  • + + {{ attachment.filename }} + ({{ attachment.mime_type }}, {{ attachment.size|filesizeformat }}) + {% if followup.user and request.user == followup.user %} + + + + {% endif %} +
  • + {% endfor %} {% endfor %}

{% trans "Description" %}

- {{ ticket.get_markdown|urlizetrunc:50|num_to_link }}
{% trans "Resolution" %}{% if "Resolved" == ticket.get_status_display %} {% endif %}
{{ ticket.get_resolution_markdown|urlizetrunc:50|linebreaksbr }}
+ {% trans "Resolution" %} + {% if "Resolved" == ticket.get_status_display %} + + + + {% endif %} +
{{ ticket.get_resolution_markdown|urlizetrunc:50|linebreaksbr }}
- + + +