More sidebar action

This commit is contained in:
Oliver 2021-10-29 01:20:24 +11:00
parent 1b5428718e
commit 80a41affc1
11 changed files with 31 additions and 121 deletions

View File

@ -6,8 +6,8 @@
InvenTree | {% trans "Manufacturer Part" %}
{% endblock %}
{% block menubar %}
{% include "company/manufacturer_part_navbar.html" %}
{% block sidebar %}
{% include "company/manufacturer_part_sidebar.html" %}
{% endblock %}
{% block breadcrumbs %}
@ -153,11 +153,6 @@ src="{% static 'img/blank_image.png' %}"
{% block js_ready %}
{{ block.super }}
enableNavbar({
label: 'manufacturer-part',
toggleId: '#manufacturer-part-menu-toggle'
});
function reloadParameters() {
$("#parameter-table").bootstrapTable("refresh");
}
@ -315,9 +310,6 @@ $('#delete-part').click(function() {
});
});
attachNavCallbacks({
name: 'manufacturerpart',
default: 'parameters'
});
enableSidebar('manufacturerpart');
{% endblock %}

View File

@ -1,41 +0,0 @@
{% load i18n %}
<ul class='list-group'>
<li class='list-group-item'>
<a href='#' id='manufacturer-part-menu-toggle'>
<span class='menu-tab-icon fas fa-expand-arrows-alt'></span>
</a>
</li>
<li class='list-group-item' title='{% trans "Parameters" %}'>
<a href='#' id='select-parameters' class='nav-toggle'>
<span class='fas fa-th-list sidebar-icon'></span>
{% trans "Parameters" %}
</a>
</li>
<li class='list-group-item' title='{% trans "Supplier Parts" %}'>
<a href='#' id='select-supplier-parts' class='nav-toggle'>
<span class='fas fa-building sidebar-icon'></span>
{% trans "Suppliers" %}
</a>
</li>
{% comment "for later" %}
<li class='list-group-item {% if tab == "stock" %}active{% endif %}' title='{% trans "Manufacturer Part Stock" %}'>
<a href='#'>
<span class='fas fa-boxes sidebar-icon'></span>
{% trans "Stock" %}
</a>
</li>
<li class='list-group-item {% if tab == "orders" %}active{% endif %}' title='{% trans "Manufacturer Part Orders" %}'>
<a href='#'>
<span class='fas fa-shopping-cart sidebar-icon'></span>
{% trans "Orders" %}
</a>
</li>
{% endcomment %}
</ul>

View File

@ -0,0 +1,6 @@
{% load i18n %}
{% load static %}
{% load inventree_extras %}
{% include "sidebar_item.html" with label='parameters' text="Parameters" icon="fa-th-list" %}
{% include "sidebar_item.html" with label='supplier-parts' text="Supplier Parts" icon="fa-building" %}

View File

@ -7,8 +7,8 @@
{% inventree_title %} | {% trans "Supplier Part" %}
{% endblock %}
{% block menubar %}
{% include "company/supplier_part_navbar.html" %}
{% block sidebar %}
{% include "company/supplier_part_sidebar.html" %}
{% endblock %}
{% block breadcrumbs %}
@ -308,12 +308,6 @@ $("#item-create").click(function() {
});
});
enableNavbar({
label: 'supplier-part',
toggleId: '#supplier-part-menu-toggle'
})
$('#order-part, #order-part2').click(function() {
launchModalForm(
"{% url 'order-parts' %}",
@ -344,9 +338,6 @@ $('#delete-part').click(function() {
});
});
attachNavCallbacks({
name: 'supplierpart',
default: 'stock'
});
enableSidebar('supplierpart');
{% endblock %}

View File

@ -0,0 +1,7 @@
{% load i18n %}
{% load static %}
{% load inventree_extras %}
{% include "sidebar_item.html" with label='stock' text="Stock Items" icon="fa-boxes" %}
{% include "sidebar_item.html" with label='purchase-orders' text="Purchase Orders" icon="fa-shopping-cart" %}
{% include "sidebar_item.html" with label='pricing' text="Supplier Part Pricing" icon="fa-dollar-sign" %}

View File

@ -3,20 +3,9 @@
{% load i18n %}
{% load static %}
{% block menubar %}
<ul class='list-group'>
<li class='list-group-item'>
<a href='#' id='po-menu-toggle'>
<span class='menu-tab-icon fas fa-expand-arrows-alt'></span>
</a>
</li>
<li class='list-group-item' title='{% trans "Return To Order" %}'>
<a href='{% url "po-detail" order.id %}' id='select-upload-file' class='nav-toggle'>
<span class='fas fa-undo side-icon'></span>
{% trans "Return To Order" %}
</a>
</li>
</ul>
{% block sidebar %}
{% url "po-detail" order.id as url %}
{% include "sidebar_item.html" with url=url text="Return to Orders" icon="fa-undo" %}
{% endblock %}
{% block page_content %}

View File

@ -3,20 +3,9 @@
{% load i18n %}
{% load static %}
{% block menubar %}
<ul class='list-group'>
<li class='list-group-item'>
<a href='#' id='part-menu-toggle'>
<span class='menu-tab-icon fas fa-expand-arrows-alt'></span>
</a>
</li>
<li class='list-group-item' title='{% trans "Return To BOM" %}'>
<a href='{% url "part-detail" part.id %}' id='select-upload-file' class='nav-toggle'>
<span class='fas fa-undo side-icon'></span>
{% trans "Return To BOM" %}
</a>
</li>
</ul>
{% block sidebar %}
{% url "part-detail" part.id as url %}
{% include "sidebar_link.html" with url=url text="Return to BOM" icon="fa-undo" %}
{% endblock %}
{% block page_content %}

View File

@ -325,9 +325,4 @@
$('#view-list').hide();
}
attachNavCallbacks({
name: 'partcategory',
default: 'part-stock'
});
{% endblock %}

View File

@ -5,8 +5,8 @@
{% load crispy_forms_tags %}
{% load markdownify %}
{% block menubar %}
{% include 'part/navbar.html' %}
{% block sidebar %}
{% include 'part/sidebar.html' %}
{% endblock %}
{% block page_content %}

View File

@ -3,20 +3,9 @@
{% load i18n %}
{% load static %}
{% block menubar %}
<ul class='list-group'>
<li class='list-group-item'>
<a href='#' id='part-menu-toggle'>
<span class='menu-tab-icon fas fa-expand-arrows-alt'></span>
</a>
</li>
<li class='list-group-item' title='{% trans "Return To Parts" %}'>
<a href='{% url "part-index" %}' id='select-upload-file' class='nav-toggle'>
<span class='fas fa-undo side-icon'></span>
{% trans "Return To Parts" %}
</a>
</li>
</ul>
{% block sidebar %}
{% url 'part-index' as url %]
{% include "sidebar_link.html" with url=url text="Return to Parts" icon="fa-undo" %}
{% endblock %}
{% block content %}
@ -70,9 +59,6 @@
{% block js_ready %}
{{ block.super }}
enableNavbar({
label: 'part',
toggleId: '#part-menu-toggle',
});
enableSidebar('partupload');
{% endblock %}

View File

@ -13,10 +13,6 @@
{% endif %}
{% endblock %}
{% block sidenav %}
<div id='part-tree'></div>
{% endblock %}
{% block breadcrumbs %}
{% if part %}
{% include "part/cat_link.html" with category=part.category part=part %}