2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-01 19:20:55 +00:00

Refactor sidebar for "location" display

This commit is contained in:
Oliver
2021-10-29 00:43:58 +11:00
parent e0d3facfac
commit 5f139b4aa4
5 changed files with 10 additions and 134 deletions

View File

@ -3,8 +3,8 @@
{% load inventree_extras %}
{% load i18n %}
{% block menubar %}
{% include "stock/location_navbar.html" %}
{% block sidebar %}
{% include "stock/location_sidebar.html" %}
{% endblock %}
{% block details_left %}
@ -173,11 +173,6 @@
{% block js_ready %}
{{ block.super }}
enableNavbar({
label: 'location',
toggleId: '#location-menu-toggle'
});
loadStockLocationTable($('#sublocation-table'), {
params: {
{% if location %}
@ -337,9 +332,6 @@
url: "{% url 'api-stock-list' %}",
});
attachNavCallbacks({
name: 'stocklocation',
default: 'stock'
});
enableSidebar('stocklocation');
{% endblock %}

View File

@ -1,25 +0,0 @@
{% load i18n %}
<ul class='list-group'>
<li class='list-group-item'>
<a href='#' id='location-menu-toggle'>
<span class='menu-tab-icon fas fa-expand-arrows-alt'></span>
</a>
</li>
<li class='list-group-item' title='{% trans "Sublocations" %}'>
<a href='#' id='select-sublocations' class='nav-toggle'>
<span class='fas fa-sitemap sidebar-icon'></span>
{% trans "Sublocations" %}
</a>
</li>
<li class='list-group-item {% if tab == "stock" %}active{% endif %}' title='{% trans "Stock Items" %}'>
<a href='#' id='select-stock' class='nav-toggle'>
<span class='fas fa-boxes sidebar-icon'></span>
{% trans "Stock Items" %}
</a>
</li>
</ul>

View File

@ -0,0 +1,6 @@
{% load i18n %}
{% load static %}
{% load inventree_extras %}
{% include "sidebar_item.html" with label='sublocations' text="Sublocations" icon="fa-sitemap" %}
{% include "sidebar_item.html" with label='stock' text="Stock Items" icon="fa-boxes" %}