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

@ -22,16 +22,20 @@
{% 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 %}
{% include "helpdesk/ticket_desc_table.html" %}
{% 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">
@ -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">
@ -87,9 +91,6 @@
<!-- /.card -->
{% endif %}
{% if helpdesk_settings.HELPDESK_TRANSLATE_TICKET_COMMENTS %}
</div>
{% endif %}
<div class="card mb-3">
<div class="card-header">{% trans "Respond to this ticket" %}</div>
@ -211,6 +212,7 @@
</div>
</div>
{% endif %}
{% endblock %}