mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Refactor sidebar for "build order" display
This commit is contained in:
parent
ec2e06fa15
commit
613b135edf
@ -186,11 +186,6 @@ src="{% static 'img/blank_image.png' %}"
|
||||
|
||||
{% block js_ready %}
|
||||
|
||||
enableNavbar({
|
||||
label: 'build',
|
||||
toggleId: '#build-menu-toggle'
|
||||
});
|
||||
|
||||
$("#build-edit").click(function () {
|
||||
editBuildOrder({{ build.pk }});
|
||||
});
|
||||
@ -234,10 +229,4 @@ src="{% static 'img/blank_image.png' %}"
|
||||
);
|
||||
});
|
||||
|
||||
attachNavCallbacks({
|
||||
name: 'buildorder',
|
||||
default: 'details'
|
||||
});
|
||||
|
||||
|
||||
{% endblock %}
|
@ -4,8 +4,8 @@
|
||||
{% load status_codes %}
|
||||
{% load markdownify %}
|
||||
|
||||
{% block menubar %}
|
||||
{% include "build/navbar.html" %}
|
||||
{% block sidebar %}
|
||||
{% include "build/sidebar.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block page_content %}
|
||||
@ -552,4 +552,7 @@ $("#btn-order-parts").click(function() {
|
||||
|
||||
{% endif %}
|
||||
|
||||
enableSidebar('buildorder');
|
||||
|
||||
|
||||
{% endblock %}
|
@ -1,66 +0,0 @@
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
{% load inventree_extras %}
|
||||
|
||||
<ul class='list-group'>
|
||||
<li class='list-group-item'>
|
||||
<a href='#' id='build-menu-toggle'>
|
||||
<span class='menu-tab-icon fas fa-expand-arrows-alt'></span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class='list-group-item' title='{% trans "Build Order Details" %}'>
|
||||
<a href='#' id='select-details' class='nav-toggle'>
|
||||
<span class='fas fa-info-circle sidebar-icon'></span>
|
||||
{% trans "Details" %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% if build.active %}
|
||||
<li class='list-group-item' title='{% trans "Allocate Stock" %}'>
|
||||
<a href='#' id='select-allocate' class='nav-toggle'>
|
||||
<span class='fas fa-tasks sidebar-icon'></span>
|
||||
{% trans "Allocate Stock" %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if not build.is_complete %}
|
||||
<li class='list-group-item' title='{% trans "Pending Outputs" %}'>
|
||||
<a href='#' id='select-outputs' class='nav-toggle'>
|
||||
<span class='fas fa-tools sidebar-icon'></span>
|
||||
{% trans "Pending Outputs" %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
<li class='list-group-item' title='{% trans "Completed Outputs" %}'>
|
||||
<a href='#' id='select-completed' class='nav-toggle'>
|
||||
<span class='fas fa-boxes sidebar-icon'></span>
|
||||
{% trans "Completed Outputs" %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class='list-group-item' title='{% trans "Child Build Orders" %}'>
|
||||
<a href='#' id='select-children' class='nav-toggle'>
|
||||
<span class='fas fa-sitemap sidebar-icon'></span>
|
||||
{% trans "Child Builds" %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<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 "Build Order Notes" %}'>
|
||||
<a href='#' id='select-notes' class='nav-toggle'>
|
||||
<span class='fas fa-clipboard sidebar-icon'></span>
|
||||
{% trans "Notes" %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
15
InvenTree/build/templates/build/sidebar.html
Normal file
15
InvenTree/build/templates/build/sidebar.html
Normal file
@ -0,0 +1,15 @@
|
||||
{% load i18n %}
|
||||
{% load static %}
|
||||
{% load inventree_extras %}
|
||||
|
||||
{% include "sidebar_item.html" with label='details' text="Build Order Details" icon="fa-info-circle" %}
|
||||
{% if build.active %}
|
||||
{% include "sidebar_item.html" with label='allocate' text="Allocate Stock" icon="fa-tasks" %}
|
||||
{% endif %}
|
||||
{% if not build.is_complete %}
|
||||
{% include "sidebar_item.html" with label='outputs' text="Pending Items" icon="fa-tools" %}
|
||||
{% endif %}
|
||||
{% include "sidebar_item.html" with label='completed' text="Completed Items" icon="fa-boxes" %}
|
||||
{% include "sidebar_item.html" with label='children' text="Child Build Orders" icon="fa-sitemap" %}
|
||||
{% include "sidebar_item.html" with label='attachments' text="Attachments" icon="fa-paperclip" %}
|
||||
{% include "sidebar_item.html" with label='notes' text="Notes" icon="fa-clipboard" %}
|
Loading…
Reference in New Issue
Block a user