Refactoring "company" view

This commit is contained in:
Oliver 2021-11-30 20:31:05 +11:00
parent 440436c70d
commit 64abe1e889
4 changed files with 86 additions and 78 deletions

View File

@ -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 %}

View File

@ -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>

View File

@ -100,9 +100,13 @@
{% 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;'>
<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 %}
&ensp;
<span class='fas fa-clone' title='{% trans "Part is a template part (variants can be made from this part)" %}'></span>
@ -143,17 +147,17 @@
{% 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>
</h4>
<table class='table table-striped table-condensed' id='part-info-table'>
<col width='25'>
</td>
</tr>
<tr>
<td><span class='fas fa-shapes'></span></td>
<td>{% trans "Part Name" %}</td>

View File

@ -148,8 +148,6 @@
{% endif %}
</h4>
<div class='info-messages'>
{% setting_object 'STOCK_OWNERSHIP_CONTROL' as owner_control %}