List number of tickets at bottom of dashboard tables

This commit is contained in:
Garret Wassermann 2018-12-21 21:56:07 -05:00
parent 9e8eb7f6b2
commit d5a06a8082
2 changed files with 24 additions and 24 deletions

View File

@ -36,7 +36,7 @@
</table> </table>
</div> </div>
</div> </div>
<div class="card-footer small text-muted">Updated yesterday at 11:59 PM</div> <div class="card-footer small text-muted">Listing {{ ticket_list|length }} ticket(s).</div>
</div> </div>

View File

@ -1,15 +1,15 @@
{% load i18n humanize %} {% load i18n humanize %}
<!-- DataTables Example --> <!-- DataTables Example -->
<div class="card mb-3"> <div class="card mb-3">
<div class="card-header"> <div class="card-header">
<i class="fas fa-table"></i> <i class="fas fa-table"></i>
{% trans "Unassigned Tickets" %} {% trans "(pick up a ticket if you start to work on it)" %} {% trans "Unassigned Tickets" %} {% trans "(pick up a ticket if you start to work on it)" %}
</div> </div>
<div class="card-body"> <div class="card-body">
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-bordered" id="dataTable" width="100%" cellspacing="0"> <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
<thead> <thead>
<tr> <tr>
<th>#</th> <th>#</th>
<th>{% trans "Pr" %}</th> <th>{% trans "Pr" %}</th>
@ -18,10 +18,10 @@
<th>{% trans "Status" %}</th> <th>{% trans "Status" %}</th>
<th>&nbsp;</th> <th>&nbsp;</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for ticket in unassigned_tickets %} {% for ticket in unassigned_tickets %}
<tr class="{{ ticket.get_priority_css_class }}"> <tr class="{{ ticket.get_priority_css_class }}">
<td><a href='{{ ticket.get_absolute_url }}'>{{ ticket.ticket }}</a></td> <td><a href='{{ ticket.get_absolute_url }}'>{{ ticket.ticket }}</a></td>
<td>{{ ticket.priority }}</td> <td>{{ ticket.priority }}</td>
<td><a href='{{ ticket.get_absolute_url }}'>{{ ticket.title }}</a></td> <td><a href='{{ ticket.get_absolute_url }}'>{{ ticket.title }}</a></td>
@ -31,14 +31,14 @@
<a href='{{ ticket.get_absolute_url }}?take'><button class='btn btn-primary btn-xs'><i class="fas fa-hand-paper"></i>&nbsp;{% trans "Take" %}</button></a> | <a href='{{ ticket.get_absolute_url }}?take'><button class='btn btn-primary btn-xs'><i class="fas fa-hand-paper"></i>&nbsp;{% trans "Take" %}</button></a> |
<a href='{% url 'helpdesk:delete' ticket.id %}'><button class='btn btn-danger btn-xs'><i class="fas fa-trash"></i>&nbsp;{% trans "Delete" %}</button></a> <a href='{% url 'helpdesk:delete' ticket.id %}'><button class='btn btn-danger btn-xs'><i class="fas fa-trash"></i>&nbsp;{% trans "Delete" %}</button></a>
</td> </td>
</tr> </tr>
{% empty %} {% empty %}
<tr><td colspan='6'>{% trans "There are no unassigned tickets." %}</td></tr> <tr><td colspan='6'>{% trans "There are no unassigned tickets." %}</td></tr>
{% endfor %} {% endfor %}
</tbody> </tbody>
</table> </table>
</div> </div>
</div> </div>
<div class="card-footer small text-muted">Updated yesterday at 11:59 PM</div> <div class="card-footer small text-muted">Listing {{ unassigned_tickets|length }} ticket(s).</div>
</div> </div>