mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Refactoring "company" view
This commit is contained in:
parent
440436c70d
commit
64abe1e889
@ -56,7 +56,29 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block details %}
|
||||
<p>{{ company.description }}</p>
|
||||
<table class='table table-striped table-condensed'>
|
||||
<col width='25'>
|
||||
<tr>
|
||||
<td><span class='fas fa-info-circle'></span></td>
|
||||
<td>{% trans "Description" %}</td>
|
||||
<td>{{ company.description }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class='fas fa-industry'></span></td>
|
||||
<td>{%trans "Manufacturer" %}</td>
|
||||
<td>{% include "yesnolabel.html" with value=company.is_manufacturer %}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class='fas fa-building'></span></td>
|
||||
<td>{% trans "Supplier" %}</td>
|
||||
<td>{% include 'yesnolabel.html' with value=company.is_supplier %}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class='fas fa-user-tie'></span></td>
|
||||
<td>{% trans "Customer" %}</td>
|
||||
<td>{% include 'yesnolabel.html' with value=company.is_customer %}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@ -110,22 +132,6 @@
|
||||
<td>{{ company.contact }}{% include "clip.html"%}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
|
||||
<tr>
|
||||
<td><span class='fas fa-industry'></span></td>
|
||||
<td>{%trans "Manufacturer" %}</td>
|
||||
<td>{% include "yesnolabel.html" with value=company.is_manufacturer %}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class='fas fa-building'></span></td>
|
||||
<td>{% trans "Supplier" %}</td>
|
||||
<td>{% include 'yesnolabel.html' with value=company.is_supplier %}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class='fas fa-user-tie'></span></td>
|
||||
<td>{% trans "Customer" %}</td>
|
||||
<td>{% include 'yesnolabel.html' with value=company.is_customer %}</td>
|
||||
</tr>
|
||||
</table>
|
||||
{% endblock %}
|
||||
|
||||
|
@ -76,6 +76,13 @@
|
||||
<td>{% trans "Category Path" %}</td>
|
||||
<td>{{ category.pathstring }}</td>
|
||||
</tr>
|
||||
{% if category.default_keywords %}
|
||||
<tr>
|
||||
<td><span class='fas fa-key'></span></td>
|
||||
<td>{% trans "Keywords" %}</td>
|
||||
<td>{{ category.default_keywords }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<tr>
|
||||
<td><span class='fas fa-sitemap'></span></td>
|
||||
@ -98,13 +105,6 @@
|
||||
<td><a href="{% url 'stock-location-detail' category.default_location.pk %}">{{ category.default_location.pathstring }}</a></td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
{% if category.default_keywords %}
|
||||
<tr>
|
||||
<td><span class='fas fa-key'></span></td>
|
||||
<td>{% trans "Keywords" %}</td>
|
||||
<td>{{ category.default_keywords }}</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
<tr>
|
||||
<td><span class='fas fa-sitemap'></span></td>
|
||||
<td>{% trans "Subcategories" %}</td>
|
||||
|
@ -100,60 +100,64 @@
|
||||
{% block details %}
|
||||
|
||||
<!-- Properties -->
|
||||
<h4>
|
||||
<div id='part-properties-wrapper' style='padding-top: 5px; padding-right: 5px;' class='d-flex flex-wrap'>
|
||||
<div id='part-properties' class='btn-group' role='group' style='padding-top: 5px;'>
|
||||
{% if part.is_template %}
|
||||
 
|
||||
<span class='fas fa-clone' title='{% trans "Part is a template part (variants can be made from this part)" %}'></span>
|
||||
{% endif %}
|
||||
{% if part.assembly %}
|
||||
 
|
||||
<span class='fas fa-tools' title='{% trans "Part can be assembled from other parts" %}'></span>
|
||||
{% endif %}
|
||||
{% if part.component %}
|
||||
 
|
||||
<span class='fas fa-th' title='{% trans "Part can be used in assemblies" %}'></span>
|
||||
{% endif %}
|
||||
{% if part.trackable %}
|
||||
 
|
||||
<span class='fas fa-directions' title='{% trans "Part stock is tracked by serial number" %}'></span>
|
||||
{% endif %}
|
||||
{% if part.purchaseable %}
|
||||
 
|
||||
<span class='fas fa-shopping-cart' title='{% trans "Part can be purchased from external suppliers" %}'></span>
|
||||
{% endif %}
|
||||
{% if part.salable %}
|
||||
 
|
||||
<span class='fas fa-dollar-sign' title='{% trans "Part can be sold to customers" %}'></span>
|
||||
{% endif %}
|
||||
<!-- Part active -->
|
||||
{% if not part.active %}
|
||||
 
|
||||
<div class='badge rounded-pill bg-danger'>
|
||||
<span class='fas fa-skull-crossbones' title='{% trans "Part is virtual (not a physical part)" %}'></span>
|
||||
{% trans 'Inactive' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<!-- Part virtual -->
|
||||
{% if part.virtual and part.active %}
|
||||
 
|
||||
<div class='badge rounded-pill bg-warning'>
|
||||
<span class='fas fa-ghost' title='{% trans "Part is virtual (not a physical part)" %}'></span>
|
||||
{% trans 'Virtual' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% include "spacer.html" %}
|
||||
<button type='button' class='btn btn-outline-secondary' data-bs-toggle='collapse' href='#collapse-part-details' role='button' id='toggle-details-button'>
|
||||
{% trans "Show Part Details" %}
|
||||
</button>
|
||||
</div>
|
||||
</h4>
|
||||
|
||||
<table class='table table-striped table-condensed' id='part-info-table'>
|
||||
<col width='25'>
|
||||
<tr>
|
||||
<td colspan='3' style='padding: 3px;'>
|
||||
<div id='part-properties-wrapper' class='d-flex flex-wrap'>
|
||||
<div id='part-properties' class='btn-group' role='group';'>
|
||||
<h5>
|
||||
{% if part.is_template %}
|
||||
 
|
||||
<span class='fas fa-clone' title='{% trans "Part is a template part (variants can be made from this part)" %}'></span>
|
||||
{% endif %}
|
||||
{% if part.assembly %}
|
||||
 
|
||||
<span class='fas fa-tools' title='{% trans "Part can be assembled from other parts" %}'></span>
|
||||
{% endif %}
|
||||
{% if part.component %}
|
||||
 
|
||||
<span class='fas fa-th' title='{% trans "Part can be used in assemblies" %}'></span>
|
||||
{% endif %}
|
||||
{% if part.trackable %}
|
||||
 
|
||||
<span class='fas fa-directions' title='{% trans "Part stock is tracked by serial number" %}'></span>
|
||||
{% endif %}
|
||||
{% if part.purchaseable %}
|
||||
 
|
||||
<span class='fas fa-shopping-cart' title='{% trans "Part can be purchased from external suppliers" %}'></span>
|
||||
{% endif %}
|
||||
{% if part.salable %}
|
||||
 
|
||||
<span class='fas fa-dollar-sign' title='{% trans "Part can be sold to customers" %}'></span>
|
||||
{% endif %}
|
||||
<!-- Part active -->
|
||||
{% if not part.active %}
|
||||
 
|
||||
<div class='badge rounded-pill bg-danger'>
|
||||
<span class='fas fa-skull-crossbones' title='{% trans "Part is virtual (not a physical part)" %}'></span>
|
||||
{% trans 'Inactive' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
<!-- Part virtual -->
|
||||
{% if part.virtual and part.active %}
|
||||
 
|
||||
<div class='badge rounded-pill bg-warning'>
|
||||
<span class='fas fa-ghost' title='{% trans "Part is virtual (not a physical part)" %}'></span>
|
||||
{% trans 'Virtual' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
</h5>
|
||||
</div>
|
||||
|
||||
{% include "spacer.html" %}
|
||||
|
||||
<button type='button' class='btn btn-outline-secondary' data-bs-toggle='collapse' href='#collapse-part-details' role='button' id='toggle-details-button'>
|
||||
{% trans "Show Part Details" %}
|
||||
</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><span class='fas fa-shapes'></span></td>
|
||||
<td>{% trans "Part Name" %}</td>
|
||||
|
@ -148,8 +148,6 @@
|
||||
{% endif %}
|
||||
</h4>
|
||||
|
||||
|
||||
|
||||
<div class='info-messages'>
|
||||
|
||||
{% setting_object 'STOCK_OWNERSHIP_CONTROL' as owner_control %}
|
||||
|
Loading…
Reference in New Issue
Block a user