Refactor title card for "location" view

This commit is contained in:
Oliver 2021-11-30 19:57:07 +11:00
parent 5049f17d0b
commit 3aad2eb13d

View File

@ -11,7 +11,7 @@
{% if location %}
{% trans "Stock Location" %}: {{ location.name }}
{% else %}
{% trans "Stock" %}
{% trans "Stock Location" %}
{% endif %}
{% endblock %}
@ -80,12 +80,32 @@
{% endblock %}
{% block details_left %}
{% if location %}
<p>{{ location.description }}</p>
{% else %}
<p>{% trans "Top level stock location" %}</p>
{% endif %}
<table class='table table-striped table-condensed'>
<col width='25'>
{% if location %}
{% if location.description %}
<tr>
<td><span class='fas fa-info-circle'></span></td>
<td>{% trans "Description" %}</td>
<td>{{ location.description }}</td>
</tr>
{% endif %}
<tr>
<td><span class='fas fa-sitemap'></span></td>
<td>{% trans "Location Path" %}</td>
<td>{{ location.pathstring }}</td>
</tr>
{% else %}
<tr>
<td><span class='fas fa-sitemap'></span></td>
<td>{% trans "Location Path" %}</td>
<td><em>{% trans "Top level stock location" %}</em></td>
</tr>
{% endif %}
</table>
{% endblock details_left %}
{% block details_below %}
{% setting_object 'STOCK_OWNERSHIP_CONTROL' as owner_control %}
{% if owner_control.value == "True" %}
{% authorized_owners location.owner as owners %}
@ -97,17 +117,12 @@
{% endif %}
{% endif %}
{% endblock %}
{% endblock details_below %}
{% block details_right %}
{% if location %}
<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>{{ location.description }}</td>
</tr>
<tr>
<td><span class='fas fa-map-marker-alt'></span></td>
<td>{% trans "Sublocations" %}</td>
@ -134,7 +149,7 @@
</tr>
</table>
{% endif %}
{% endblock %}
{% endblock details_right %}
{% block page_content %}