mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-19 21:45:39 +00:00
breadcrumbs
This commit is contained in:
@ -1,16 +1,10 @@
|
||||
{% load i18n %}
|
||||
|
||||
<div class='navigation'>
|
||||
<nav aria-label="breadcrumb">
|
||||
<ol class="breadcrumb">
|
||||
<li><a href='#' id='toggle-part-tree'><strong><span class='fas fa-stream'></span></strong></a></li>
|
||||
<li class="breadcrumb-item{% if category is None %} active" aria-current="page{% endif %}"><a href="/part/">{% trans "Parts" %}</a></li>
|
||||
<li><a href='#' id='toggle-part-tree'><strong><span class='fas fa-stream'></span></strong></a></li>
|
||||
<li class="breadcrumb-item{% if category is None %} active" aria-current="page{% endif %}"><a href="/part/">{% trans "Parts" %}</a></li>
|
||||
{% if category %}
|
||||
{% for path_item in category.parentpath %}
|
||||
<li class="breadcrumb-item"><a href="{% url 'category-detail' path_item.id %}">{{ path_item.name }}</a></li>
|
||||
<li class="breadcrumb-item"><a href="{% url 'category-detail' path_item.id %}">{{ path_item.name }}</a></li>
|
||||
{% endfor %}
|
||||
<li class="breadcrumb-item active" aria-current="page"><a href="{% url 'category-detail' category.id %}">{{ category.name }}</a></li>
|
||||
<li class="breadcrumb-item active" aria-current="page"><a href="{% url 'category-detail' category.id %}">{{ category.name }}</a></li>
|
||||
{% endif %}
|
||||
</ol>
|
||||
</nav>
|
||||
</div>
|
@ -32,27 +32,25 @@
|
||||
<h3>{% trans "Part Categories" %}</h3>
|
||||
<p>{% trans "All parts" %}</p>
|
||||
{% endif %}
|
||||
<p>
|
||||
<div class='btn-group action-buttons'>
|
||||
{% if roles.part_category.add %}
|
||||
<button class='btn btn-default' id='cat-create' title='{% trans "Create new part category" %}'>
|
||||
<span class='fas fa-plus-circle icon-green'/>
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if category %}
|
||||
{% if roles.part_category.change %}
|
||||
<button class='btn btn-default' id='cat-edit' title='{% trans "Edit part category" %}'>
|
||||
<span class='fas fa-edit icon-blue'/>
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if roles.part_category.delete %}
|
||||
<button class='btn btn-default' id='cat-delete' title='{% trans "Delete part category" %}'>
|
||||
<span class='fas fa-trash-alt icon-red'/>
|
||||
</button>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</p>
|
||||
<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" %}'>
|
||||
<span class='fas fa-plus-circle icon-green'/>
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if category %}
|
||||
{% if roles.part_category.change %}
|
||||
<button class='btn btn-outline-secondary' id='cat-edit' title='{% trans "Edit part category" %}'>
|
||||
<span class='fas fa-edit icon-blue'/>
|
||||
</button>
|
||||
{% endif %}
|
||||
{% if roles.part_category.delete %}
|
||||
<button class='btn btn-outline-secondary' id='cat-delete' title='{% trans "Delete part category" %}'>
|
||||
<span class='fas fa-trash-alt icon-red'/>
|
||||
</button>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class='col-sm-6'>
|
||||
{% if category %}
|
||||
|
@ -17,14 +17,12 @@
|
||||
<div id='part-tree'></div>
|
||||
{% endblock %}
|
||||
|
||||
{% block pre_content %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{% if part %}
|
||||
{% include "part/cat_link.html" with category=part.category %}
|
||||
{% else %}
|
||||
{% include 'part/cat_link.html' with category=category %}
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block js_ready %}
|
||||
|
Reference in New Issue
Block a user