part category and stock location views

This commit is contained in:
Oliver 2021-10-27 23:53:41 +11:00
parent a21959f54d
commit 8535dd7572
2 changed files with 98 additions and 102 deletions

View File

@ -6,35 +6,25 @@
{% include 'part/category_navbar.html' %}
{% endblock %}
{% block content %}
{% if messages %}
{% for message in messages %}
<div class='{{ message.tags }}'>
{{ message|safe }}
</div>
{% endfor %}
{% endif %}
<div class='panel panel-inventree'>
<div class='row'>
<div class='col-sm-6'>
{% if category %}
<h3>
{{ category.name }}
{% block details_left %}
{% if category %}
<h4>
{% trans "Part Category" %}: {{ category.name }}
{% if user.is_staff and roles.part_category.change %}
<a href="{% url 'admin:part_partcategory_change' category.pk %}"><span title="{% trans 'Admin view' %}" class='fas fa-user-shield'></span></a>
{% endif %}
</h3>
<p>{{ category.description }}</p>
{% else %}
<h3>{% trans "Part Categories" %}</h3>
<p>{% trans "All parts" %}</p>
{% endif %}
<div class='btn-group' role='group'>
</h4>
<p>{{ category.description }}</p>
{% else %}
<h4>
{% trans "Parts" %}
</h4>
<p>{% trans "Top level part category" %}</p>
{% endif %}
<div class='btn-group' role='group'>
{% if roles.part_category.add %}
<button class='btn btn-outline-secondary' id='cat-create' title='{% trans "Create new part category" %}'>
<button class='btn btn-success' id='cat-create' title='{% trans "Create new part category" %}'>
<span class='fas fa-plus-circle icon-green'/>
</button>
{% endif %}
@ -50,12 +40,14 @@
</button>
{% endif %}
{% endif %}
</div>
</div>
<div class='col-sm-6'>
{% if category %}
<h3>{% trans "Category Details" %}</h3>
<table class='table table-condensed table-striped'>
</div>
{% endblock %}
{% block details_right %}
{% if category %}
<table class='table table-condensed table-striped'>
<col width='25'>
<tr>
<td><span class='fas fa-sitemap'></span></td>
@ -91,10 +83,10 @@
<td>{% trans "Parts (Including subcategories)" %}</td>
<td>{{ category.partcount }}</td>
</tr>
</table>
{% else %}
<h3>{% trans "Category Details" %}</h3>
<table class='table table-striped table-condensed'>
</table>
{% else %}
<h3>{% trans "Category Details" %}</h3>
<table class='table table-striped table-condensed'>
<col width='25'>
<tr>
<td><span class='fas fa-sitemap'></span></td>
@ -106,15 +98,20 @@
<td>{% trans "Parts" %}</td>
<td>{{ part_count }}</td>
</tr>
</table>
{% endif %}
</div>
</div>
</div>
</table>
{% endif %}
{% endblock %}
{% block page_content %}
{% if messages %}
{% for message in messages %}
<div class='{{ message.tags }}'>
{{ message|safe }}
</div>
{% endfor %}
{% endif %}
<div class='panel panel-inventree panel-hidden' id='panel-parts'>
<div class='panel-heading'>
<h4>{% trans "Parts" %}</h4>
@ -191,7 +188,6 @@
{% endblock %}
{% endblock %}
{% block js_load %}
{{ block.super }}
{% endblock %}

View File

@ -20,7 +20,7 @@
<h4>
{% trans "Stock" %}
</h4>
<p>{% trans "All stock items" %}</p>
<p>{% trans "Top level stock location" %}</p>
{% endif %}
<div class='btn-group' role='group'>