mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-11-03 22:55:43 +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'>
 | 
			
		||||
            <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 %}
 | 
			
		||||
 
 | 
			
		||||
@@ -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 %}
 | 
			
		||||
 
 | 
			
		||||
@@ -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 %}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,16 +1,10 @@
 | 
			
		||||
{% 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>
 | 
			
		||||
<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 %}
 | 
			
		||||
{% for path_item in location.parentpath %}
 | 
			
		||||
    <li class='breadcrumb-item'><a href="{% url 'stock-location-detail' path_item.id %}">{{ path_item.name }}</a></li>
 | 
			
		||||
<li class='breadcrumb-item'><a href="{% url 'stock-location-detail' path_item.id %}">{{ path_item.name }}</a></li>
 | 
			
		||||
{% endfor %}
 | 
			
		||||
    <li class='breadcrumb-item active' aria-current='page'><a href="{% url 'stock-location-detail' location.id %}">{{ location.name }}</a></li>
 | 
			
		||||
<li class='breadcrumb-item active' aria-current='page'><a href="{% url 'stock-location-detail' location.id %}">{{ location.name }}</a></li>
 | 
			
		||||
{% endif %}
 | 
			
		||||
  </ol>
 | 
			
		||||
 </nav>
 | 
			
		||||
</div>
 | 
			
		||||
@@ -17,7 +17,7 @@
 | 
			
		||||
</div>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block pre_content %}
 | 
			
		||||
{% block breadcrumbs %}
 | 
			
		||||
{% if item %}
 | 
			
		||||
{% include 'stock/loc_link.html' with location=item.location %}
 | 
			
		||||
{% else %}
 | 
			
		||||
 
 | 
			
		||||
@@ -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 %}
 | 
			
		||||
 
 | 
			
		||||
@@ -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',
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user