mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-30 12:36:45 +00:00
Refactor sidebar for "company" display
This commit is contained in:
parent
613b135edf
commit
5a2c20ea55
@ -130,11 +130,6 @@
|
|||||||
{% block js_ready %}
|
{% block js_ready %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
|
|
||||||
enableNavbar({
|
|
||||||
label: 'company',
|
|
||||||
toggleId: '#company-menu-toggle'
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#company-edit').click(function() {
|
$('#company-edit').click(function() {
|
||||||
editCompany({{ company.id }});
|
editCompany({{ company.id }});
|
||||||
});
|
});
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load markdownify %}
|
{% load markdownify %}
|
||||||
|
|
||||||
{% block menubar %}
|
{% block sidebar %}
|
||||||
{% include 'company/navbar.html' with tab='details' %}
|
{% include 'company/sidebar.html' %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block page_content %}
|
{% block page_content %}
|
||||||
@ -405,9 +405,6 @@
|
|||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
attachNavCallbacks({
|
enableSidebar('company');
|
||||||
name: 'company',
|
|
||||||
default: 'company-stock'
|
|
||||||
});
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -1,70 +0,0 @@
|
|||||||
{% load i18n %}
|
|
||||||
{% load static %}
|
|
||||||
{% load inventree_extras %}
|
|
||||||
|
|
||||||
<ul class='list-group'>
|
|
||||||
<li class='list-group-item'>
|
|
||||||
<a href='#' id='company-menu-toggle'>
|
|
||||||
<span class='menu-tab-icon fas fa-expand-arrows-alt'></span>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
{% if company.is_manufacturer %}
|
|
||||||
<li class='list-group-item' title='{% trans "Manufactured Parts" %}'>
|
|
||||||
<a href='#' id='select-manufacturer-parts' class='nav-toggle'>
|
|
||||||
<span class='fas fa-industry sidebar-icon'></span>
|
|
||||||
{% trans "Manufactured Parts" %}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if company.is_supplier %}
|
|
||||||
<li class='list-group-item' title='{% trans "Supplied Parts" %}'>
|
|
||||||
<a href='#' id='select-supplier-parts' class='nav-toggle'>
|
|
||||||
<span class='fas fa-building sidebar-icon'></span>
|
|
||||||
{% trans "Supplied Parts" %}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if company.is_manufacturer or company.is_supplier %}
|
|
||||||
<li class='list-group-item' title='{% trans "Stock Items" %}'>
|
|
||||||
<a href='#' id='select-company-stock' class='nav-toggle'>
|
|
||||||
<span class='fas fa-boxes sidebar-icon'></span>
|
|
||||||
{% trans "Stock" %}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if company.is_supplier %}
|
|
||||||
<li class='list-group-item' title='{% trans "Purchase Orders" %}'>
|
|
||||||
<a href='#' id='select-purchase-orders' class='nav-toggle'>
|
|
||||||
<span class='fas fa-shopping-cart sidebar-icon'></span>
|
|
||||||
{% trans "Purchase Orders" %}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if company.is_customer %}
|
|
||||||
<li class='list-group-item' title='{% trans "Sales Orders" %}'>
|
|
||||||
<a href='#' id='select-sales-orders' class='nav-toggle'>
|
|
||||||
<span class='fas fa-truck sidebar-icon'></span>
|
|
||||||
{% trans "Sales Orders" %}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li class='list-group-item' title='{% trans "Assigned Stock" %}'>
|
|
||||||
<a href='#' id='select-assigned-stock' class='nav-toggle'>
|
|
||||||
<span class='fas fa-sign-out-alt sidebar-icon'></span>
|
|
||||||
{% trans "Assigned Stock" %}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<li class='list-group-item' title='{% trans "Notes" %}'>
|
|
||||||
<a href='#' id='select-company-notes' class='nav-toggle'>
|
|
||||||
<span class='fas fa-clipboard sidebar-icon'></span>
|
|
||||||
{% trans "Notes" %}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
</ul>
|
|
19
InvenTree/company/templates/company/sidebar.html
Normal file
19
InvenTree/company/templates/company/sidebar.html
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
{% load i18n %}
|
||||||
|
{% load static %}
|
||||||
|
{% load inventree_extras %}
|
||||||
|
|
||||||
|
{% if company.is_manufacturer %}
|
||||||
|
{% include "sidebar_item.html" with label='manufacturer-parts' text="Manufactured Parts" icon="fa-industry" %}
|
||||||
|
{% endif %}
|
||||||
|
{% if company.is_supplier %}
|
||||||
|
{% include "sidebar_item.html" with label='supplier-parts' text="Supplied Parts" icon="fa-building" %}
|
||||||
|
{% include "sidebar_item.html" with label='purchase-orders' text="Purchase Orders" icon="fa-shopping-cart" %}
|
||||||
|
{% endif %}
|
||||||
|
{% if company.is_manufacturer or company.is_supplier %}
|
||||||
|
{% include "sidebar_item.html" with label='company-stock' text="Supplied Stock Items" icon="fa-boxes" %}
|
||||||
|
{% endif %}
|
||||||
|
{% if company.is_customer %}
|
||||||
|
{% include "sidebar_item.html" with label='sales-orders' text="Sales Orders" icon="fa-truck" %}
|
||||||
|
{% include "sidebar_item.html" with label='assigned-stock' text="Assigned Stock Items" icon="fa-sign-out-alt" %}
|
||||||
|
{% endif %}
|
||||||
|
{% include "sidebar_item.html" with label='company-notes' text="Notes" icon="fa-clipboard" %}
|
Loading…
x
Reference in New Issue
Block a user