Reformat ticket page and show in which ticket it has been merged to

This commit is contained in:
bbe 2020-10-29 23:32:51 +01:00
parent e1cd9d0f2e
commit 49735dbcda

View File

@ -21,19 +21,23 @@
{% endblock %}
{% block helpdesk_body %}
{% if helpdesk_settings.HELPDESK_TRANSLATE_TICKET_COMMENTS %}
{% comment %}
<div id='translate_dropdown'>{% trans "Translate ticket comments into" %} </div>
<div id='translate_block'>
{% endcomment %}
<div id="google_translate_element"></div>
<script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
{% endif %}
{% if helpdesk_settings.HELPDESK_TRANSLATE_TICKET_COMMENTS %}
<div id="google_translate_element"></div>
<script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
{% endif %}
{% include "helpdesk/ticket_desc_table.html" %}
{% include "helpdesk/ticket_desc_table.html" %}
{% if ticket.followup_set.all %}
{% load ticket_to_link %}
{% if ticket.merged_to %}
<div class="card card-body bg-light">
<h3 class="text-center">
{% trans "This ticket has been merged into ticket" %}
<a href="{{ ticket.merged_to.get_absolute_url }}">{{ ticket.merged_to }}</a>
</h3>
</div>
{% else %}
{% if ticket.followup_set.all %}
{% load ticket_to_link %}
<div class="card mb-3">
<div class="card-header"><i class="fas fa-clock fa-fw fa-lg"></i>&nbsp;{% trans "Follow-Ups" %}</div>
<div class="card-body">
@ -41,7 +45,7 @@
{% for followup in ticket.followup_set.all %}
<div class="list-group-item list-group-item-action">
<div class="d-flex w-100 justify-content-between">
<h5 class="mb-1">{{ followup.title }}</h5>
<h5 class="mb-1">{{ followup.title|num_to_link }}</h5>
<small><i class="fas fa-clock"></i>&nbsp;<span class='byline text-info'>{% if followup.user %}by {{ followup.user }},{% endif %} <span title='{{ followup.date|date:"r" }}'>{{ followup.date|naturaltime }}</span>{% if followup.time_spent %}, <span>{% trans "time spent" %}: {{ followup.time_spent_formated }}</span>{% endif %} {% if not followup.public %} <span class='private'>({% trans "Private" %})</span>{% endif %}</span></small>
</div>
<p class="mb-1">
@ -86,18 +90,15 @@
</div>
<!-- /.card -->
{% endif %}
{% if helpdesk_settings.HELPDESK_TRANSLATE_TICKET_COMMENTS %}
</div>
{% endif %}
{% endif %}
<div class="card mb-3">
<div class="card mb-3">
<div class="card-header">{% trans "Respond to this ticket" %}</div>
<div class="card-body">
<form method='post' action='update/' enctype='multipart/form-data'>
<form method='post' action='update/' enctype='multipart/form-data'>
<fieldset>
<fieldset>
<dl>
{% if preset_replies %}
<dt><label for='id_preset'>{% trans "Use a Pre-set Reply" %}</label> <span class='form_optional'>{% trans "(Optional)" %}</span></dt>
@ -163,9 +164,9 @@
{% endif %}
</dl>
<p id='ShowFurtherOptPara'><button class="btn btn-warning btn-sm" id='ShowFurtherEditOptions'>{% trans "Change Further Details &raquo;" %}</button></p>
<p id='ShowFurtherOptPara'><button class="btn btn-warning btn-sm" id='ShowFurtherEditOptions'>{% trans "Change Further Details &raquo;" %}</button></p>
<div id='FurtherEditOptions' style='display: none;'>
<div id='FurtherEditOptions' style='display: none;'>
<dl>
@ -183,11 +184,11 @@
</dl>
</div>
</div>
<p id='ShowFileUploadPara'><button class="btn btn-warning btn-sm" id='ShowFileUpload'>{% trans "Attach File(s) &raquo;" %}</button></p>
<p id='ShowFileUploadPara'><button class="btn btn-warning btn-sm" id='ShowFileUpload'>{% trans "Attach File(s) &raquo;" %}</button></p>
<div id='FileUpload' style='display: none;'>
<div id='FileUpload' style='display: none;'>
<dl>
<dt><label for='id_file'>{% trans "Attach a File" %}</label></dt>
@ -201,16 +202,17 @@
</dd>
</dl>
</div>
</div>
</fieldset>
</fieldset>
<button class="btn btn-primary float-right" type='submit'>{% trans "Update This Ticket" %}</button>
<button class="btn btn-primary float-right" type='submit'>{% trans "Update This Ticket" %}</button>
{% csrf_token %}</form>
{% csrf_token %}</form>
</div>
</div>
</div>
{% endif %}
{% endblock %}