Add pencil buttons to ticket view for easier assignment and priority setting

This commit is contained in:
Timothy Hobbs 2019-02-02 20:40:46 +01:00
parent 7699c48a7f
commit c33d6d24d0
No known key found for this signature in database
GPG Key ID: 9CA9B3D779CEEDE7
2 changed files with 21 additions and 7 deletions

View File

@ -168,7 +168,7 @@
<dt><label for='id_priority'>{% trans "Priority" %}</label></dt> <dt><label for='id_priority'>{% trans "Priority" %}</label></dt>
<dd><select id='id_priority' name='priority'>{% for p in priorities %}<option value='{{ p.0 }}'{% ifequal p.0 ticket.priority %} selected='selected'{% endifequal %}>{{ p.1 }}</option>{% endfor %}</select></dd> <dd><select id='id_priority' name='priority'>{% for p in priorities %}<option value='{{ p.0 }}'{% ifequal p.0 ticket.priority %} selected='selected'{% endifequal %}>{{ p.1 }}</option>{% endfor %}</select></dd>
<dt><label for='id_due_date'>{% trans "Due on" %}</label></dt> <dt><label for='id_due_date'>{% trans "Due on" %}</label></dt>
<dd>{{ form.due_date }}</dd> <dd>{{ form.due_date }}</dd>
@ -215,8 +215,7 @@ $( function() {
<script type='text/javascript' language='javascript'> <script type='text/javascript' language='javascript'>
$(document).ready(function() { $(document).ready(function() {
$("#ShowFurtherEditOptions").click(function() { $("#ShowFurtherEditOptions").click(function() {
$("#FurtherEditOptions").fadeIn(); $("#FurtherEditOptions").toggle();
$("#ShowFurtherOptPara").hide();
return false; return false;
}); });

View File

@ -37,7 +37,11 @@
</tr>{% endif %} </tr>{% endif %}
<tr> <tr>
<th>{% trans "Due Date" %}</th> <th>{% trans "Due Date" %}</th>
<td>{{ ticket.due_date|date:"r" }} ({{ ticket.due_date|naturaltime }})</td> <td>{{ ticket.due_date|date:"r" }} ({{ ticket.due_date|naturaltime }})
<strong>
<a href='#FurtherEditOptions'><button type="button" class="btn btn-sm btn-warning float-right" onclick="$('#FurtherEditOptions').fadeIn()"><i class="fas fa-pencil-alt"></i></button></a>
</strong>
</td>
</tr> </tr>
<tr> <tr>
<th>{% trans "Submitted On" %}</th> <th>{% trans "Submitted On" %}</th>
@ -45,17 +49,28 @@
</tr> </tr>
<tr> <tr>
<th>{% trans "Assigned To" %}</th> <th>{% trans "Assigned To" %}</th>
<td>{{ ticket.get_assigned_to }}{% ifequal ticket.get_assigned_to _('Unassigned') %} <strong><a href='?take'><button type="button" class="btn btn-primary btn-sm"><i class="fas fa-hand-paper"></i>&nbsp;{% trans "Take" %}</button></a></strong>{% endifequal %}</td> <td>{{ ticket.get_assigned_to }}{% ifequal ticket.get_assigned_to _('Unassigned') %} <strong>
<a href='?take'><button type="button" class="btn btn-primary btn-sm"><i class="fas fa-hand-paper"></i>&nbsp;{% trans "Take" %}</button></a>
</strong>{% endifequal %}
<strong>
<a href='#FurtherEditOptions'><button type="button" class="btn btn-sm btn-warning float-right" onclick="$('#FurtherEditOptions').fadeIn()"><i class="fas fa-pencil-alt"></i></button></a>
</strong>
</td>
</tr> </tr>
<tr> <tr>
<th>{% trans "Submitter E-Mail" %}</th> <th>{% trans "Submitter E-Mail" %}</th>
<td>{{ ticket.submitter_email }} <td>{{ ticket.submitter_email }}
{% if user.is_superuser %} {% if submitter_userprofile_url %}<strong><a href='{{submitter_userprofile_url}}'><button type="button" class="btn btn-primary btn-sm"><i class="fas fa-address-book"></i>&nbsp;{% trans "Profile" %}</button></a></strong>{% endif %} {% if user.is_superuser %} {% if submitter_userprofile_url %}<strong><a href='{{submitter_userprofile_url}}'><button type="button" class="btn btn-primary btn-sm"><i class="fas fa-address-book"></i>&nbsp;{% trans "Profile" %}</button></a></strong>{% endif %}
<strong><a href='{% url 'helpdesk:email_ignore_add' %}?email={{ ticket.submitter_email }}'><button type="button" class="btn btn-warning btn-sm"><i class="fas fa-eye-slash"></i>&nbsp;{% trans "Ignore" %}</button></a></strong>{% endif %}</td> <strong><a href='{% url 'helpdesk:email_ignore_add' %}?email={{ ticket.submitter_email }}'><button type="button" class="btn btn-warning btn-sm"><i class="fas fa-eye-slash"></i>&nbsp;{% trans "Ignore" %}</button></a></strong>{% endif %}
</td>
</tr> </tr>
<tr> <tr>
<th>{% trans "Priority" %}</th> <th>{% trans "Priority" %}</th>
<td>{{ ticket.get_priority_display }}</td> <td>{{ ticket.get_priority_display }}
<strong>
<a href='#FurtherEditOptions'><button type="button" class="btn btn-sm btn-warning float-right" onclick="$('#FurtherEditOptions').fadeIn()"><i class="fas fa-pencil-alt"></i></button></a>
</strong>
</td>
</tr> </tr>
<tr> <tr>
<th>{% trans "Copies To" %}</th> <th>{% trans "Copies To" %}</th>