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' %} {% include 'part/category_navbar.html' %}
{% endblock %} {% endblock %}
{% block content %} {% block details_left %}
{% 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 %} {% if category %}
<h3> <h4>
{{ category.name }} {% trans "Part Category" %}: {{ category.name }}
{% if user.is_staff and roles.part_category.change %} {% 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> <a href="{% url 'admin:part_partcategory_change' category.pk %}"><span title="{% trans 'Admin view' %}" class='fas fa-user-shield'></span></a>
{% endif %} {% endif %}
</h3> </h4>
<p>{{ category.description }}</p> <p>{{ category.description }}</p>
{% else %} {% else %}
<h3>{% trans "Part Categories" %}</h3> <h4>
<p>{% trans "All parts" %}</p> {% trans "Parts" %}
</h4>
<p>{% trans "Top level part category" %}</p>
{% endif %} {% endif %}
<div class='btn-group' role='group'> <div class='btn-group' role='group'>
{% if roles.part_category.add %} {% 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'/> <span class='fas fa-plus-circle icon-green'/>
</button> </button>
{% endif %} {% endif %}
@ -51,10 +41,12 @@
{% endif %} {% endif %}
{% endif %} {% endif %}
</div> </div>
</div>
<div class='col-sm-6'> {% endblock %}
{% block details_right %}
{% if category %} {% if category %}
<h3>{% trans "Category Details" %}</h3>
<table class='table table-condensed table-striped'> <table class='table table-condensed table-striped'>
<col width='25'> <col width='25'>
<tr> <tr>
@ -108,13 +100,18 @@
</tr> </tr>
</table> </table>
{% endif %} {% endif %}
</div> {% endblock %}
</div>
</div>
{% block page_content %} {% 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 panel-inventree panel-hidden' id='panel-parts'>
<div class='panel-heading'> <div class='panel-heading'>
<h4>{% trans "Parts" %}</h4> <h4>{% trans "Parts" %}</h4>
@ -191,7 +188,6 @@
{% endblock %} {% endblock %}
{% endblock %}
{% block js_load %} {% block js_load %}
{{ block.super }} {{ block.super }}
{% endblock %} {% endblock %}

View File

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