mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-02-02 13:22:17 +00:00
Add the usual set of fields to supplier and update form accordingly
This commit is contained in:
63
templates/partials/generic_list.html
Normal file
63
templates/partials/generic_list.html
Normal file
@@ -0,0 +1,63 @@
|
||||
{% load url_replace from filters %}
|
||||
{% load orderby from filters %}
|
||||
{% load paginator from filters %}
|
||||
<div class="row justify-content-end">
|
||||
<a href="{% url create %}" class="btn btn-success">New <span
|
||||
class="fas fa-plus"></span></a>
|
||||
</div>
|
||||
<div class="row justify-content-end">
|
||||
<form class="form-inline py-3">
|
||||
{% csrf_token %}
|
||||
<div class="input-group pull-right">
|
||||
<input type="search" name="query" placeholder="Search" value="{{ request.GET.query }}"
|
||||
class="form-control"/>
|
||||
<span class="input-group-append"><button type="submit" class="btn btn-primary" id="id_search">Search</button></span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">#</th>
|
||||
<th scope="col">Name<a href="?{% orderby request 'orderBy' 'name' %}"><span class="caret"></span></a></td>
|
||||
<th scope="col">Email</th>
|
||||
<th scope="col">Phone</th>
|
||||
<th scope="col">Notes</th>
|
||||
{% if union_account %} {#TODO#}
|
||||
<th scope="col">Union Account</th>
|
||||
{% endif %}
|
||||
<th scope="col">Quick Links</th>
|
||||
</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>
|
||||
{% if is_paginated %}
|
||||
<div class="col-sm-12">{% paginator %}</div>
|
||||
{% endif %}
|
||||
5
templates/partials/last_edited.html
Normal file
5
templates/partials/last_edited.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<div>
|
||||
<a href="{% url target object.pk %}" title="View Revision History">
|
||||
Last edited {{ object.last_edited_at|default:'never' }} by {{ object.last_edited_by.name|default:'System' }}
|
||||
</a>
|
||||
</div>
|
||||
Reference in New Issue
Block a user