mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-02-08 07:59:42 +00:00
Generic list template
This commit is contained in:
48
RIGS/templates/partials/generic_list.html
Normal file
48
RIGS/templates/partials/generic_list.html
Normal file
@@ -0,0 +1,48 @@
|
||||
{% load url_replace from filters %}
|
||||
{% load orderby from filters %}
|
||||
{% load paginator from filters %}
|
||||
<div class="col-sm-12">{% paginator %}</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<td scope="col">#</td>
|
||||
<td scope="col">Name<a href="?{% orderby request 'orderBy' 'name' %}"><span class="caret"></span></a></td>
|
||||
<td scope="col">Email</td>
|
||||
<td scope="col">Phone</td>
|
||||
<td scope="col">Notes</td>
|
||||
{% if union_account %} {#TODO#}
|
||||
<td scope="col">Union Account</td>
|
||||
{% endif %}
|
||||
<td scope="col">Quick Links</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for object in object_list %}
|
||||
<tr>
|
||||
<th scope="row">{{ object.pk }}</th>
|
||||
<td>{{ object.name }}</td>
|
||||
<td>{{ object.email }}</td>
|
||||
<td>{% if object.phone %}<a href="tel:{{ object.phone }}">{%endif%}{{ object.phone }}{% if object.phone %}</a>{%endif%}</td>
|
||||
<td>{{ object.notes|yesno|capfirst }}</td>
|
||||
{% if union_account %}
|
||||
<td>{{ object.union_account|yesno|capfirst }}</td>
|
||||
{% endif %}
|
||||
<td>
|
||||
<a href="{% url detail object.pk %}" class="btn btn-primary modal-href">
|
||||
<i class="fas fa-eye"></i>
|
||||
</a>
|
||||
<a href="{% url edit object.pk %}" class="btn btn-secondary"><i
|
||||
class="fas fa-edit"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td></td>
|
||||
<td colspan="5">Nothing found</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-sm-12">{% paginator %}</div>
|
||||
Reference in New Issue
Block a user