2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-29 12:06:44 +00:00

Buttonize the part category page

This commit is contained in:
Oliver Walters 2019-06-19 18:54:32 +10:00
parent 1fc39d56df
commit d837a1f9a2

View File

@ -4,36 +4,35 @@
{% block content %} {% block content %}
<div class='row'> <div class='row'>
<div class='col-sm-6'> <div class='col-sm-6'>
{% if category %} {% if category %}
<h3>{{ category.name }}</h3> <h3>{{ category.name }}</h3>
<p>{{ category.description }}</p> <p>{{ category.description }}</p>
{% if category.default_location %} {% if category.default_location %}
<p>Default Location: <a href="{% url 'stock-location-detail' category.default-location.id }%">{{ category.default_location }}</a></p> <p>Default Location: <a href="{% url 'stock-location-detail' category.default-location.id }%">{{ category.default_location }}</a></p>
{% endif %} {% endif %}
{% else %} {% else %}
<h3>Part Categories</h3> <h3>Part Categories</h3>
{% endif %} <p>All parts</p>
</div> {% endif %}
<div class='col-sm-6'> <p>
<h3> <div class='btn-group'>
<div style='float: right;'> <button class='btn btn-default btn-glyph' id='cat-create' title='Create new part category'>
<button class='btn btn-success' id='cat-create'>New Category</button> <span class='glyphicon glyphicon-plus'/>
{% if category %} </button>
<div class="dropdown" style="float: right;"> {% if category %}
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown"> <button class='btn btn-default btn-glyph' id='cat-edit' title='Edit part category'>
Options <span class='glyphicon glyphicon-cog'/>
<span class="caret"></span> </button>
</button> <button class='btn btn-default btn-glyph' id='cat-delete' title='Delete part category'>
<ul class="dropdown-menu"> <span class='glyphicon glyphicon-trash'/>
<li><a href="#" id='cat-edit' title='Edit part category'>Edit</a></li> </button>
<li><a href="#" id='cat-delete' title='Delete part category'>Delete</a></li> {% endif %}
</ul> </div>
</p>
</div> </div>
{% endif %} <div class='col-sm-6'>
</div> </div>
</h3>
</div>
</div> </div>
{% if category and category.children.all|length > 0 %} {% if category and category.children.all|length > 0 %}