mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Cleaner part details
This commit is contained in:
parent
bb60eed897
commit
bfc421c50b
@ -18,19 +18,14 @@
|
|||||||
<div class="media-body">
|
<div class="media-body">
|
||||||
<h3>
|
<h3>
|
||||||
{{ part.full_name }}
|
{{ part.full_name }}
|
||||||
|
</h3>
|
||||||
|
<p>
|
||||||
|
<h3>
|
||||||
|
<!-- Admin View -->
|
||||||
{% if user.is_staff and roles.part.change %}
|
{% if user.is_staff and roles.part.change %}
|
||||||
<a href="{% url 'admin:part_part_change' part.pk %}"><span title="{% trans 'Admin view' %}" class='fas fa-user-shield'></span></a>
|
<a href="{% url 'admin:part_part_change' part.pk %}"><span title="{% trans 'Admin view' %}" class='fas fa-user-shield'></span></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if not part.active %}
|
<!-- Properties -->
|
||||||
<div class='label label-large label-large-red'>
|
|
||||||
{% trans 'Inactive' %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
</h3>
|
|
||||||
{% if part.description %}
|
|
||||||
<p><em>{{ part.description }}</em></p>
|
|
||||||
{% endif %}
|
|
||||||
<p>
|
|
||||||
<div id='part-properties' class='btn-group' role='group'>
|
<div id='part-properties' class='btn-group' role='group'>
|
||||||
{% if part.virtual %}
|
{% if part.virtual %}
|
||||||
<span class='fas fa-ghost' title='{% trans "Part is virtual (not a physical part)" %}'></span>
|
<span class='fas fa-ghost' title='{% trans "Part is virtual (not a physical part)" %}'></span>
|
||||||
@ -54,6 +49,13 @@
|
|||||||
<span class='fas fa-dollar-sign' title='{% trans "Part can be sold to customers" %}'></span>
|
<span class='fas fa-dollar-sign' title='{% trans "Part can be sold to customers" %}'></span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
<!-- Part active -->
|
||||||
|
{% if not part.active %}
|
||||||
|
<div class='label label-large label-large-red'>
|
||||||
|
{% trans 'Inactive' %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</h3>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<div class='btn-group action-buttons' role='group'>
|
<div class='btn-group action-buttons' role='group'>
|
||||||
@ -122,20 +124,50 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<table class='table table-condensed'>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class='info-messages'>
|
||||||
|
{% if part.virtual %}
|
||||||
|
<div class='alert alert-warning alert-block'>
|
||||||
|
{% trans "This is a virtual part" %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
{% if part.variant_of %}
|
||||||
|
<div class='alert alert-info alert-block'>
|
||||||
|
{% object_link 'part-detail' part.variant_of.id part.variant_of.full_name as link %}
|
||||||
|
{% blocktrans %}This part is a variant of {{link}}{% endblocktrans %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<table class='table table-condensed table-striped'>
|
||||||
<col width='25'>
|
<col width='25'>
|
||||||
|
{% if part.description %}
|
||||||
|
<td><span class='fas fa-info-circle'></span></td>
|
||||||
|
<td>{% trans "Description" %}</td>
|
||||||
|
<td>{{ part.description }}{% include "clip.html"%}</td>
|
||||||
|
{% endif %}
|
||||||
|
{% if part.revision %}
|
||||||
|
<tr>
|
||||||
|
<td><span class='fas fa-code-branch'></span></td>
|
||||||
|
<td>{% trans "Revision" %}</td>
|
||||||
|
<td>{{ part.revision }}{% include "clip.html"%}</td>
|
||||||
|
</tr>
|
||||||
|
{% endif %}
|
||||||
{% if part.keywords %}
|
{% if part.keywords %}
|
||||||
<tr>
|
<tr>
|
||||||
<td><span class='fas fa-key'></span></td>
|
<td><span class='fas fa-key'></span></td>
|
||||||
<td>{% trans "Keywords" %}</td>
|
<td>{% trans "Keywords" %}</td>
|
||||||
<td>{{ part.keywords }}</td>
|
<td>{{ part.keywords }}{% include "clip.html"%}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if part.link %}
|
{% if part.link %}
|
||||||
<tr>
|
<tr>
|
||||||
<td><span class='fas fa-link'></span></td>
|
<td><span class='fas fa-link'></span></td>
|
||||||
<td>{% trans "External Link" %}</td>
|
<td>{% trans "External Link" %}</td>
|
||||||
<td><a href="{{ part.link }}">{{ part.link }}</a></td>
|
<td><a href="{{ part.link }}">{{ part.link }}</a>{% include "clip.html"%}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<tr>
|
<tr>
|
||||||
@ -155,33 +187,24 @@
|
|||||||
<td>{{ part.getLatestSerialNumber }}{% include "clip.html"%}</td>
|
<td>{{ part.getLatestSerialNumber }}{% include "clip.html"%}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</table>
|
{% if part.default_location %}
|
||||||
</div>
|
<tr>
|
||||||
</div>
|
<td><span class='fas fa-search-location'></span></td>
|
||||||
|
<td>{% trans "Default Location" %}</td>
|
||||||
<div class='info-messages'>
|
<td>{{ part.default_location }}</td>
|
||||||
{% if part.virtual %}
|
</tr>
|
||||||
<div class='alert alert-warning alert-block'>
|
|
||||||
{% trans "This is a virtual part" %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if part.variant_of %}
|
{% if part.default_supplier %}
|
||||||
<div class='alert alert-info alert-block'>
|
<tr>
|
||||||
{% object_link 'part-detail' part.variant_of.id part.variant_of.full_name as link %}
|
<td><span class='fas fa-building'></span></td>
|
||||||
{% blocktrans %}This part is a variant of {{link}}{% endblocktrans %}
|
<td>{% trans "Default Supplier" %}</td>
|
||||||
</div>
|
<td>{{ part.default_supplier }}</td>
|
||||||
|
</tr>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-6">
|
|
||||||
<table class="table table-striped">
|
|
||||||
<col width='25'>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td><span class='fas fa-boxes'></span></td>
|
<td><span class='fas fa-boxes'></span></td>
|
||||||
<td>
|
<td>{% trans "Available Stock" %}</td>
|
||||||
<h4>{% trans "Available Stock" %}</h4>
|
<td>{% decimal available %}{% if part.units %} {{ part.units }}{% endif %}</td>
|
||||||
</td>
|
|
||||||
<td><h4>{% decimal available %}{% if part.units %} {{ part.units }}{% endif %}</h4></td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><span class='fas fa-map-marker-alt'></span></td>
|
<td><span class='fas fa-map-marker-alt'></span></td>
|
||||||
|
Loading…
Reference in New Issue
Block a user