mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-01 19:20:55 +00:00
Refactor sidebar for "stock item" page
This commit is contained in:
@ -6,8 +6,8 @@
|
||||
{% load l10n %}
|
||||
{% load markdownify %}
|
||||
|
||||
{% block menubar %}
|
||||
{% include "stock/navbar.html" %}
|
||||
{% block sidebar %}
|
||||
{% include "stock/stock_sidebar.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block page_content %}
|
||||
@ -397,4 +397,6 @@
|
||||
url: "{% url 'api-stock-tracking-list' %}",
|
||||
});
|
||||
|
||||
enableSidebar('stockitem');
|
||||
|
||||
{% endblock %}
|
||||
|
@ -8,10 +8,6 @@
|
||||
{% inventree_title %} | {% trans "Stock Item" %} - {{ item }}
|
||||
{% endblock %}
|
||||
|
||||
{% block sidenav %}
|
||||
<div id='stock-tree'></div>
|
||||
{% endblock %}
|
||||
|
||||
{% block breadcrumbs %}
|
||||
{% include 'stock/loc_link.html' with location=item.location %}
|
||||
{% endblock %}
|
||||
@ -430,11 +426,6 @@
|
||||
{% block js_ready %}
|
||||
{{ block.super }}
|
||||
|
||||
enableNavbar({
|
||||
label: 'item',
|
||||
toggleId: '#item-menu-toggle',
|
||||
});
|
||||
|
||||
loadTree("{% url 'api-stock-tree' %}",
|
||||
"#stock-tree",
|
||||
{
|
||||
@ -621,9 +612,4 @@ $("#stock-return-from-customer").click(function() {
|
||||
|
||||
{% endif %}
|
||||
|
||||
attachNavCallbacks({
|
||||
name: 'stockitem',
|
||||
default: 'history'
|
||||
});
|
||||
|
||||
{% endblock %}
|
||||
|
@ -1,61 +0,0 @@
|
||||
{% load i18n %}
|
||||
|
||||
<ul class='list-group'>
|
||||
|
||||
<li class='list-group-item'>
|
||||
<a href='#' id='item-menu-toggle'>
|
||||
<span class='menu-tab-icon fas fa-expand-arrows-alt'></span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class='list-group-item' title='{% trans "Stock Item Tracking" %}'>
|
||||
<a href='#' id='select-history' class='nav-toggle'>
|
||||
<span class='fas fa-history sidebar-icon'></span>
|
||||
{% trans "History" %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% if item.part.trackable %}
|
||||
<li class='list-group-item' title='{% trans "Test Data" %}'>
|
||||
<a href='#' id='select-test-data' class='nav-toggle'>
|
||||
<span class='fas fa-vial sidebar-icon'></span>
|
||||
{% trans "Test Data" %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% if item.part.assembly %}
|
||||
<li class='list-group-item' title='{% trans "Installed Stock Items" %}'>
|
||||
<a href='#' id='select-installed-items' class='nav-toggle'>
|
||||
<span class='fas fa-sign-in-alt sidebar-icon'></span>
|
||||
{% trans "Installed Items" %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% if item.child_count > 0 %}
|
||||
<li class='list-group-item' title='{% trans "Child Items" %}'>
|
||||
<a href='#' id='select-children' class='nav-toggle'>
|
||||
<span class='fas fa-sitemap sidebar-icon'></span>
|
||||
{% trans "Children" %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
|
||||
<li class='list-group-item' title='{% trans "Attachments" %}'>
|
||||
<a href='#' id='select-attachments' class='nav-toggle'>
|
||||
<span class='fas fa-paperclip sidebar-icon'></span>
|
||||
{% trans "Attachments" %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class='list-group-item' title='{% trans "Stock Item Notes" %}'>
|
||||
<a href='#' id='select-notes' class='nav-toggle'>
|
||||
<span class='fas fa-clipboard sidebar-icon'></span>
|
||||
{% trans "Notes" %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
16
InvenTree/stock/templates/stock/stock_sidebar.html
Normal file
16
InvenTree/stock/templates/stock/stock_sidebar.html
Normal file
@ -0,0 +1,16 @@
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
{% load inventree_extras %}
|
||||
|
||||
{% include "sidebar_item.html" with label='history' text="Stock Tracking" icon="fa-history" %}
|
||||
{% if item.part.trackable %}
|
||||
{% include "sidebar_item.html" with label='test-data' text="Test Data" icon="fa-vial" %}
|
||||
{% endif %}
|
||||
{% if item.part.assembly %}
|
||||
{% include "sidebar_item.html" with label='installed-items' text="Installed Items" icon="fa-sign-in-alt" %}
|
||||
{% endif %}
|
||||
{% if item.child_count > 0 %}
|
||||
{% include "sidebar_item.html" with label='children' text="Child Items" icon="fa-sitemap" %}
|
||||
{% endif %}
|
||||
{% include "sidebar_item.html" with label='attachments' text="Attachments" icon="fa-paperclip" %}
|
||||
{% include "sidebar_item.html" with label='notes' text="Notes" icon="fa-clipboard" %}
|
Reference in New Issue
Block a user