Add the usual set of fields to supplier and update form accordingly

This commit is contained in:
2020-03-17 20:07:14 +00:00
parent b9d318e675
commit 36556dea33
9 changed files with 92 additions and 12 deletions

View File

@@ -25,6 +25,10 @@
{% if perms.assets.add_asset %}
<a class="list-group-item list-group-item-action" href="{% url 'asset_create' %}"><i class="fas fa-plus"></i> New Asset</a>
{% endif %}
<a class="list-group-item list-group-item-action" href="{% url 'supplier_list' %}"><i class="fas fa-parachute-box"></i> Supplier List </a>
{% if perms.assets.add_asset %}
<a class="list-group-item list-group-item-action" href="{% url 'supplier_create' %}"><i class="fas fa-plus"></i> New Supplier</a>
{% endif %}
</div>
<div class="card-header">
<h4 class="list-group-item-heading">Quick Links</h4>

View File

@@ -1,63 +0,0 @@
{% 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 %}

View File

@@ -1,5 +0,0 @@
<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>

View File

@@ -6,7 +6,7 @@
<div>
<h1 class="bd-title">Rigboard</h1>
{% if perms.RIGS.add_event %}
<a href="{% url 'event_create' %}" class="btn btn-outline-primary float-right my-3">New <i class="fas fa-plus"></i></a>
<a href="{% url 'event_create' %}" class="btn btn-success float-right my-3">New <i class="fas fa-plus"></i></a>
{% endif %}
</div>
{% include 'event_table.html' %}