2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-04-29 20:16: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,7 +4,7 @@
{% 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>
@ -13,27 +13,26 @@
{% endif %} {% endif %}
{% else %} {% else %}
<h3>Part Categories</h3> <h3>Part Categories</h3>
<p>All parts</p>
{% endif %} {% endif %}
</div> <p>
<div class='col-sm-6'> <div class='btn-group'>
<h3> <button class='btn btn-default btn-glyph' id='cat-create' title='Create new part category'>
<div style='float: right;'> <span class='glyphicon glyphicon-plus'/>
<button class='btn btn-success' id='cat-create'>New Category</button> </button>
{% if category %} {% if category %}
<div class="dropdown" style="float: right;"> <button class='btn btn-default btn-glyph' id='cat-edit' title='Edit part category'>
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown"> <span class='glyphicon glyphicon-cog'/>
Options </button>
<span class="caret"></span> <button class='btn btn-default btn-glyph' id='cat-delete' title='Delete part category'>
<span class='glyphicon glyphicon-trash'/>
</button> </button>
<ul class="dropdown-menu">
<li><a href="#" id='cat-edit' title='Edit part category'>Edit</a></li>
<li><a href="#" id='cat-delete' title='Delete part category'>Delete</a></li>
</ul>
</div>
{% endif %} {% endif %}
</div> </div>
</h3> </p>
</div> </div>
<div class='col-sm-6'>
</div>
</div> </div>
{% if category and category.children.all|length > 0 %} {% if category and category.children.all|length > 0 %}