mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
part category and stock location views
This commit is contained in:
parent
a21959f54d
commit
8535dd7572
@ -6,35 +6,25 @@
|
|||||||
{% include 'part/category_navbar.html' %}
|
{% include 'part/category_navbar.html' %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block details_left %}
|
||||||
|
{% if category %}
|
||||||
{% if messages %}
|
<h4>
|
||||||
{% for message in messages %}
|
{% trans "Part Category" %}: {{ category.name }}
|
||||||
<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 }}
|
|
||||||
{% 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" %}
|
||||||
{% endif %}
|
</h4>
|
||||||
<div class='btn-group' role='group'>
|
<p>{% trans "Top level part category" %}</p>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<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 %}
|
||||||
@ -50,12 +40,14 @@
|
|||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class='col-sm-6'>
|
{% endblock %}
|
||||||
{% if category %}
|
|
||||||
<h3>{% trans "Category Details" %}</h3>
|
{% block details_right %}
|
||||||
<table class='table table-condensed table-striped'>
|
|
||||||
|
{% if category %}
|
||||||
|
<table class='table table-condensed table-striped'>
|
||||||
<col width='25'>
|
<col width='25'>
|
||||||
<tr>
|
<tr>
|
||||||
<td><span class='fas fa-sitemap'></span></td>
|
<td><span class='fas fa-sitemap'></span></td>
|
||||||
@ -91,10 +83,10 @@
|
|||||||
<td>{% trans "Parts (Including subcategories)" %}</td>
|
<td>{% trans "Parts (Including subcategories)" %}</td>
|
||||||
<td>{{ category.partcount }}</td>
|
<td>{{ category.partcount }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
{% else %}
|
{% else %}
|
||||||
<h3>{% trans "Category Details" %}</h3>
|
<h3>{% trans "Category Details" %}</h3>
|
||||||
<table class='table table-striped table-condensed'>
|
<table class='table table-striped table-condensed'>
|
||||||
<col width='25'>
|
<col width='25'>
|
||||||
<tr>
|
<tr>
|
||||||
<td><span class='fas fa-sitemap'></span></td>
|
<td><span class='fas fa-sitemap'></span></td>
|
||||||
@ -106,15 +98,20 @@
|
|||||||
<td>{% trans "Parts" %}</td>
|
<td>{% trans "Parts" %}</td>
|
||||||
<td>{{ part_count }}</td>
|
<td>{{ part_count }}</td>
|
||||||
</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 %}
|
||||||
|
@ -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'>
|
||||||
|
Loading…
Reference in New Issue
Block a user