breadcrumbs

This commit is contained in:
Oliver 2021-10-27 20:17:37 +11:00
parent 219191eb6a
commit 9df9aaa18f
8 changed files with 43 additions and 47 deletions

View File

@ -1,8 +1,5 @@
{% 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>
{% if category %}
@ -11,6 +8,3 @@
{% endfor %}
<li class="breadcrumb-item active" aria-current="page"><a href="{% url 'category-detail' category.id %}">{{ category.name }}</a></li>
{% endif %}
</ol>
</nav>
</div>

View File

@ -32,27 +32,25 @@
<h3>{% trans "Part Categories" %}</h3>
<p>{% trans "All parts" %}</p>
{% endif %}
<p>
<div class='btn-group action-buttons'>
<div class='btn-group' role='group'>
{% if roles.part_category.add %}
<button class='btn btn-default' id='cat-create' title='{% trans "Create new part category" %}'>
<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-default' id='cat-edit' title='{% trans "Edit part category" %}'>
<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-default' id='cat-delete' title='{% trans "Delete part category" %}'>
<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>
</p>
</div>
<div class='col-sm-6'>
{% if category %}

View File

@ -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 %}

View File

@ -12,7 +12,7 @@
<div id='stock-tree'></div>
{% endblock %}
{% block pre_content %}
{% block breadcrumbs %}
{% include 'stock/loc_link.html' with location=item.location %}
{% endblock %}

View File

@ -1,8 +1,5 @@
{% load i18n %}
<div class="navigation">
<nav aria-label="breadcrumb">
<ol class="breadcrumb">
<li><a href='#' title='Toggle Stock Tree' id='toggle-stock-tree'><strong><span class='fas fa-stream'></span></strong></a></li>
<li class="breadcrumb-item{% if location is None %} active" aria-current="page{% endif %}"><a href="/stock/">{% trans "Stock" %}</a></li>
{% if location %}
@ -11,6 +8,3 @@
{% endfor %}
<li class='breadcrumb-item active' aria-current='page'><a href="{% url 'stock-location-detail' location.id %}">{{ location.name }}</a></li>
{% endif %}
</ol>
</nav>
</div>

View File

@ -17,7 +17,7 @@
</div>
{% endblock %}
{% block pre_content %}
{% block breadcrumbs %}
{% if item %}
{% include 'stock/loc_link.html' with location=item.location %}
{% else %}

View File

@ -71,6 +71,16 @@
<div class='inventree-body'>
<div class='container-fluid'>
<nav aria-label='breadcrumb'>
<ol class='breadcrumb'>
{% block breadcrumbs %}
<li class='breadcrumb-item active'>Breadcrumbs Go Here!</li>
{% endblock %}
</ol>
</nav>
</div>
<div class='containter-fluid inventree-pre-content'>
{% block pre_content %}
{% endblock %}

View File

@ -2024,6 +2024,8 @@ function constructHiddenInput(name, parameters) {
// Construct a "checkbox" input
function constructCheckboxInput(name, parameters) {
var todo = "refactor this with the new bootstrap slide-toggle thingy";
return constructInputOptions(
name,
'form-check-input',