mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 13:32:15 +00:00
* FIX #388: Prevent assets losing supplier data on edit * FEAT: Add associated assets to supplier detail view * FIX: Tweak supplier list to make detail view accessible * Potential fix for #380 No idea if it works because I can't reproduce locally. S/O Reckons it should... :P * FEAT #386: Asset search searches serial number. Pending addition of advanced search. * FIX: Order asset categories/statuses alphabetically Instead of by pk because that's silly. * FEAT: Statuses can have a CSS class defined in the admin panel This replaces the hardcoding of colours in the asset list. * FIX: Squash migrations * Fixed supplier not working on all the create asset template * Refactored away "assets" property on "Supplier" by using "related_name" instead Co-authored-by: Matthew Smith <mattysmith22@googlemail.com>
74 lines
2.7 KiB
HTML
74 lines
2.7 KiB
HTML
{% extends 'base_assets.html' %}
|
|
{% block title %}Supplier | {{ object.name }}{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="row">
|
|
{% if not request.is_ajax %}
|
|
<div class="col-sm-12">
|
|
<h1>Supplier | {{ object.name }}</h1>
|
|
</div>
|
|
|
|
<div class="col-sm-12 text-right">
|
|
<div class="btn-group btn-page">
|
|
<a href="{% url 'supplier_update' object.pk %}" class="btn btn-default"><span
|
|
class="glyphicon glyphicon-pencil"></span> Edit</a>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
<div class="col-sm-6">
|
|
<div class="panel panel-info">
|
|
<div class="panel-heading">Supplier Details</div>
|
|
<div class="panel-body">
|
|
<dl class="dl-horizontal">
|
|
<dt>Name</dt>
|
|
<dd>{{ object.name }}</dd>
|
|
</dl>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="row">
|
|
<div class="col-sm-12">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">Associated Assets</div>
|
|
<div class="panel-body">
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>Asset ID</th>
|
|
<th>Description</th>
|
|
<th>Category</th>
|
|
<th>Status</th>
|
|
<th class="hidden-xs">Quick Links</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="asset_table_body">
|
|
{% with object.assets.all as object_list %}
|
|
{% include 'partials/asset_list_table_body.html' %}
|
|
{% endwith %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
{% if not request.is_ajax %}
|
|
<div class="row">
|
|
<div class="col-sm-12 text-right">
|
|
<div class="btn-group btn-page">
|
|
<a href="{% url 'supplier_update' object.pk %}" class="btn btn-default"><span
|
|
class="glyphicon glyphicon-pencil"></span> Edit</a>
|
|
</div>
|
|
<div>
|
|
<a href="{% url 'supplier_update' object.pk %}" title="View Revision History">
|
|
Last edited {{ object.last_edited_at }} by {{ object.last_edited_by.name }}
|
|
</a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|