|
9 | 9 | #} |
10 | 10 |
|
11 | 11 | {%- extends 'portal/overall.html' %} |
| 12 | +{% from 'macros.html' import render_form %} |
12 | 13 | {% set BREADCRUMBS = [(_('Tickets'), href('portal', 'tickets/list'))] + BREADCRUMBS|d([]) %} |
13 | 14 |
|
14 | 15 | {% block content %} |
|
48 | 49 | {{ element.reporting_time|datetime }} |
49 | 50 | </td> |
50 | 51 | <td> |
51 | | - {{ element.reporter_comment }} |
| 52 | + {{ element.reporter_comment_rendered }} |
52 | 53 | </td> |
53 | 54 | </tr> |
54 | 55 | <tr> |
55 | 56 | <td> |
56 | 57 | {% if element.owning_user %} |
57 | | - {% trans %}Owned by{% endtrans %} <a href="{{ element.owning_user|url }}">{{ element.owning_user.username }}</a><br> |
| 58 | + {% trans %}Owned by{% endtrans %} <a href="{{ element.owning_user|url }}">{{ element.owning_user.username }}</a> |
| 59 | + {% if element.owning_user == USER %} |
| 60 | + (<a href="../{{ element.id }}/disown">{% trans %}Release ownership{% endtrans %}</a>) |
| 61 | + {% endif %} |
| 62 | + <br> |
58 | 63 | {{ element.owned_time|datetime }} |
59 | 64 | {% else %} |
60 | | - <a href="todo/take_over">{% trans %}Take ownership{% endtrans %}</a> |
| 65 | + <a href="../{{ element.id }}/own">{% trans %}Take ownership{% endtrans %}</a> |
| 66 | + {% if element.owned_time %} |
| 67 | + <br> |
| 68 | + {% trans %}Previously already owned at {% endtrans %}{{ element.owned_time|datetime }} |
| 69 | + {% endif %} |
61 | 70 | {% endif %} |
62 | 71 | </td> |
63 | 72 | <td> |
64 | | - {{ element.owner_comment }} |
| 73 | + {% if element.owning_user == USER %} |
| 74 | + {% if owner_comment_form and edit_ticket_id==element.id %} |
| 75 | + <owner_comment_form id="owner_comment" method="post" action="" class="new_topic"> |
| 76 | + {{ csrf_token() }} |
| 77 | + {{ render_form(owner_comment_form, ['owner_comment'], inline=true) }}<br> |
| 78 | + <input type="submit" value="{% trans %}Submit{% endtrans %}" /> |
| 79 | + </owner_comment_form> |
| 80 | + {% else %} |
| 81 | + {% if element.owner_comment %} |
| 82 | + <a href="../{{ element.id }}/edit" class="action action_edit">{% trans %}Edit comment{% endtrans %}</a><br> |
| 83 | + {{ element.owner_comment_rendered }} |
| 84 | + {% else %} |
| 85 | + <a href="../{{ element.id }}/edit" class="action action_edit">{% trans %}Add comment{% endtrans %}</a><br> |
| 86 | + {% endif %} |
| 87 | + {% endif %} |
| 88 | + {% else %} |
| 89 | + {{ element.owner_comment_rendered }} |
| 90 | + {% endif %} |
65 | 91 | </td> |
66 | 92 | </tr> |
67 | 93 | {%- else %} |
|
84 | 110 | {%- trans %}Subscribe to topic reports{% endtrans -%} |
85 | 111 | </a> |
86 | 112 | {%- endif %} |
| 113 | + {%- if USER.has_perm('portal.change_ticketreason') %} |
| 114 | + | |
| 115 | + <a href="{{ href('portal', 'ticketreason', 'list') }}"> |
| 116 | + {%- trans %}Manage ticket reasons{% endtrans -%} |
| 117 | + </a> |
| 118 | + {%- endif %} |
87 | 119 | </div> |
88 | 120 | </form> |
89 | 121 | {% endblock %} |
0 commit comments