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:
@ -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 %}
|
||||
|
@ -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>
|
6
InvenTree/stock/templates/stock/location_sidebar.html
Normal file
6
InvenTree/stock/templates/stock/location_sidebar.html
Normal 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" %}
|
Reference in New Issue
Block a user