2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-05-03 13:58:47 +00:00

Refactor display for "part category"

This commit is contained in:
Oliver 2021-11-30 20:00:26 +11:00
parent 3aad2eb13d
commit 440436c70d
2 changed files with 26 additions and 19 deletions

View File

@ -61,29 +61,36 @@
{% endblock %}
{% block details_left %}
{% if category %}
<p>{{ category.description }}</p>
{% else %}
<p>{% trans "Top level part category" %}</p>
{% endif %}
{% endblock %}
<table class='table table-striped table-condensed'>
<col width='25'>
{% if category %}
{% if category.description %}
<tr>
<td><span class='fas fa-info-circle'></span></td>
<td>{% trans "Description" %}</td>
<td>{{ category.description }}</td>
</tr>
{% endif %}
<tr>
<td><span class='fas fa-sitemap'></span></td>
<td>{% trans "Category Path" %}</td>
<td>{{ category.pathstring }}</td>
</tr>
{% else %}
<tr>
<td><span class='fas fa-sitemap'></span></td>
<td>{% trans "Category Path" %}</td>
<td><em>{% trans "Top level part category" %}</em></td>
</tr>
{% endif %}
</table>
{% endblock details_left %}
{% block details_right %}
{% if category %}
<table class='table table-condensed table-striped'>
<col width='25'>
<tr>
<td><span class='fas fa-sitemap'></span></td>
<td>{% trans "Category Path" %}</td>
<td>{{ category.pathstring }}</td>
</tr>
<tr>
<td><span class='fas fa-info-circle'></span></td>
<td>{% trans "Category Description" %}</td>
<td>{{ category.description }}</td>
</tr>
{% if category.default_location %}
<tr>
<td><span class='fas fa-map-marker-alt'></span></td>
@ -124,7 +131,7 @@
</tr>
</table>
{% endif %}
{% endblock %}
{% endblock details_right %}
{% block page_content %}

View File

@ -11,7 +11,7 @@
{% if location %}
{% trans "Stock Location" %}: {{ location.name }}
{% else %}
{% trans "Stock Location" %}
{% trans "Stock" %}
{% endif %}
{% endblock %}