From 61d8df932cb4d7b2d1c902a59c4a6b3938a64d87 Mon Sep 17 00:00:00 2001 From: Jachym Cepicky Date: Tue, 2 Jul 2019 14:40:20 +0200 Subject: [PATCH] more redminenish ticket view --- helpdesk/templates/helpdesk/edit_ticket.html | 2 +- .../templates/helpdesk/followup_edit.html | 2 +- helpdesk/templates/helpdesk/ticket.html | 15 +- .../templates/helpdesk/ticket_desc_table.html | 156 ++++++++---------- 4 files changed, 79 insertions(+), 96 deletions(-) diff --git a/helpdesk/templates/helpdesk/edit_ticket.html b/helpdesk/templates/helpdesk/edit_ticket.html index 3da7bca5..67d42750 100644 --- a/helpdesk/templates/helpdesk/edit_ticket.html +++ b/helpdesk/templates/helpdesk/edit_ticket.html @@ -39,7 +39,7 @@ {% endcomment %}
- +
diff --git a/helpdesk/templates/helpdesk/followup_edit.html b/helpdesk/templates/helpdesk/followup_edit.html index bbd2f0ca..e74e3203 100644 --- a/helpdesk/templates/helpdesk/followup_edit.html +++ b/helpdesk/templates/helpdesk/followup_edit.html @@ -50,7 +50,7 @@
{{ form.time_spent }}
-

{% csrf_token %} +

{% csrf_token %} diff --git a/helpdesk/templates/helpdesk/ticket.html b/helpdesk/templates/helpdesk/ticket.html index 2e6b2dbb..84a78b16 100644 --- a/helpdesk/templates/helpdesk/ticket.html +++ b/helpdesk/templates/helpdesk/ticket.html @@ -42,24 +42,21 @@
{{ followup.title }}
-   +  

{% if followup.comment %}

{{ followup.get_markdown|urlizetrunc:50|num_to_link|linebreaksbr }}

{% endif %} - {% if followup.time_spent %} - {% trans "Time spent" %}: {{ followup.time_spent_formated }}

- {% endif %} {% for change in followup.ticketchange_set.all %} {% if forloop.first %}
    {% endif %}
  • {% blocktrans with change.field as field and change.old_value as old_value and change.new_value as new_value %}Changed {{ field }} from {{ old_value }} to {{ new_value }}.{% endblocktrans %}
  • {% if forloop.last %}
{% endif %} {% endfor %} - {% for attachment in followup.followupattachment_set.all %}{% if forloop.first %}
    {% endif %} + {% for attachment in followup.followupattachment_set.all %}{% if forloop.first %}{% trans "Attachments" %}:
    {% endif %} @@ -71,11 +68,11 @@ {% if helpdesk_settings.HELPDESK_SHOW_EDIT_BUTTON_FOLLOW_UP %} {% if followup.user and request.user == followup.user and not followup.ticketchange_set.all %} - + {% endif %} {% endif %} {% if user.is_superuser and helpdesk_settings.HELPDESK_SHOW_DELETE_BUTTON_SUPERUSER_FOLLOW_UP %} - + {% endif %} {% endif %}{% endwith %} @@ -208,7 +205,7 @@ - + {% csrf_token %} diff --git a/helpdesk/templates/helpdesk/ticket_desc_table.html b/helpdesk/templates/helpdesk/ticket_desc_table.html index 86b965b4..409ad521 100644 --- a/helpdesk/templates/helpdesk/ticket_desc_table.html +++ b/helpdesk/templates/helpdesk/ticket_desc_table.html @@ -2,31 +2,90 @@ {% load static from staticfiles %}
    -
    - {% trans "Ticket Summary" %} -
    +
    - - -

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

    + + + - + {% for customfield in ticket.ticketcustomfieldvalue_set.all %} - + {% endfor %} - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + {% if ticket.resolution %} @@ -35,82 +94,9 @@ {% endif %} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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

    + {% blocktrans with ticket.queue as queue %}Queue: {{ queue }}{% endblocktrans %} + | {% if ticket.on_hold %} | {% else %} | {% endif %} -
    {% blocktrans with ticket.queue as queue %}Queue: {{ queue }}{% endblocktrans %}
    {{ customfield.field.label }}{{ customfield.field.label }} {% ifequal customfield.field.data_type "url" %}{{ customfield.value }}{% else %}{{ customfield.value }}{% endifequal %}
    {% trans "Description" %}{% trans "Due Date" %}{{ ticket.due_date|date:"d. E Y" }} {% if ticket.due_date %}({{ ticket.due_date|naturaltime }}){% endif %} + {% trans "Submitted On" %}{{ ticket.created|date:"d. E Y" }} ({{ ticket.created|naturaltime }})
    {{ ticket.get_markdown|urlizetrunc:50|num_to_link|linebreaksbr }}{% trans "Assigned To" %}{{ ticket.get_assigned_to }}{% ifequal ticket.get_assigned_to _('Unassigned') %} + + {% endifequal %} + {% trans "Submitter E-Mail" %}{{ ticket.submitter_email }} + {% if user.is_superuser %} {% if submitter_userprofile_url %}{% endif %} + + {% endif %} +
    {% trans "Priority" %}{{ ticket.get_priority_display }} + {% trans "Copies To" %}{{ 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 "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 %} + {% endfor %} +
    +
    +

    {% trans "Description" %}

    + {{ ticket.get_markdown|urlizetrunc:50|num_to_link|linebreaksbr }}
    {{ ticket.get_resolution_markdown|urlizetrunc:50|linebreaksbr }}
    {% trans "Due Date" %}{{ ticket.due_date|date:"r" }} ({{ ticket.due_date|naturaltime }}) - - - -
    {% trans "Submitted On" %}{{ ticket.created|date:"r" }} ({{ ticket.created|naturaltime }})
    {% trans "Assigned To" %}{{ ticket.get_assigned_to }}{% ifequal ticket.get_assigned_to _('Unassigned') %} - - {% endifequal %} - - - -
    {% trans "Submitter E-Mail" %}{{ ticket.submitter_email }} - {% if user.is_superuser %} {% if submitter_userprofile_url %}{% endif %} - {% endif %} -
    {% trans "Priority" %}{{ ticket.get_priority_display }} - - - -
    {% trans "Copies To" %}{{ 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 "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 %} - {% endfor %} -
    -
    +