mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Company view now uses menubar
This commit is contained in:
parent
3210af31b4
commit
5525b23b9f
@ -2,13 +2,16 @@
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block menubar %}
|
||||
{% include "company/navbar.html" with tab="assigned" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block heading %}
|
||||
{% trans "Assigned Stock" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block details %}
|
||||
|
||||
{% include "company/tabs.html" with tab="assigned" %}
|
||||
|
||||
<h4>{% trans "Assigned Stock" %}</h4>
|
||||
<hr>
|
||||
|
||||
<div id='button-toolbar'>
|
||||
<div class='filter-list' id='filter-list-stock'>
|
||||
<!-- An empty div in which the filter list will be constructed -->
|
||||
|
@ -92,6 +92,10 @@ InvenTree | {% trans "Company" %} - {{ company.name }}
|
||||
{% block js_ready %}
|
||||
{{ block.super }}
|
||||
|
||||
enableRightNavbar({
|
||||
minWidth: '50px'
|
||||
});
|
||||
|
||||
$('#company-edit').click(function() {
|
||||
launchModalForm(
|
||||
"{% url 'company-edit' company.id %}",
|
||||
|
@ -1,13 +1,16 @@
|
||||
{% extends "company/company_base.html" %}
|
||||
{% load static %}
|
||||
{% load i18n %}}
|
||||
{% load i18n %}
|
||||
|
||||
{% block menubar %}
|
||||
{% include 'company/navbar.html' with tab='details' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block heading %}
|
||||
{% trans "Company Details" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block details %}
|
||||
|
||||
{% include 'company/tabs.html' with tab='details' %}
|
||||
|
||||
<h4>{% trans "Company Details" %}</h4>
|
||||
<hr>
|
||||
|
||||
<div class='row'>
|
||||
<div class='col-sm-6'>
|
||||
<table class='table table-striped'>
|
||||
|
@ -1,14 +1,17 @@
|
||||
{% extends "company/company_base.html" %}
|
||||
{% load static %}
|
||||
{% block details %}
|
||||
{% load i18n %}
|
||||
|
||||
{% include 'company/tabs.html' with tab='parts' %}
|
||||
{% block menubar %}
|
||||
{% include 'company/navbar.html' with tab='parts' %}
|
||||
{% endblock %}
|
||||
|
||||
<h4>{% trans "Supplier Parts" %}</h4>
|
||||
{% block heading %}
|
||||
{% trans "Supplier Parts" %}
|
||||
{% endblock %}
|
||||
|
||||
<hr>
|
||||
|
||||
{% block details %}
|
||||
{% if roles.purchase_order.change %}
|
||||
<div id='button-toolbar'>
|
||||
<div class='button-toolbar container-fluid'>
|
||||
|
@ -2,14 +2,16 @@
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block menubar %}
|
||||
{% include "company/navbar.html" with tab='stock' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block heading %}
|
||||
{% trans "Supplier Stock" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block details %}
|
||||
|
||||
{% include "company/tabs.html" with tab='stock' %}
|
||||
|
||||
<h4>{% trans "Supplier Stock" %}</h4>
|
||||
|
||||
<hr>
|
||||
|
||||
{% include "stock_table.html" %}
|
||||
|
||||
{% endblock %}
|
||||
|
66
InvenTree/company/templates/company/navbar.html
Normal file
66
InvenTree/company/templates/company/navbar.html
Normal file
@ -0,0 +1,66 @@
|
||||
{% 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>
|
||||
|
||||
<li class='list-group-item {% if tab == "details" %}active{% endif %}' title='{% trans "Company Details" %}'>
|
||||
<a href='{% url "company-detail" company.id %}'>
|
||||
<span class='fas fa-info-circle'></span>
|
||||
{% trans "Details" %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% if company.is_supplier or company.is_manufacturer %}
|
||||
<li class='list-group-item {% if tab == "parts" %}active{% endif %}' title='{% trans "Supplied Parts" %}'>
|
||||
<a href='{% url "company-detail-parts" company.id %}'>
|
||||
<span class='fas fa-shapes'></span>
|
||||
{% trans "Parts" %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class='list-group-item {% if tab == "stock" %}active{% endif %}' title='{% trans "Stock Items" %}'>
|
||||
<a href='{% url "company-detail-stock" company.id %}'>
|
||||
<span class='fas fa-boxes'></span>
|
||||
{% trans "Stock" %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if company.is_supplier %}
|
||||
<li class='list-group-item {% if tab == "po" %}active{% endif %}' title='{% trans "Sales Orders" %}'>
|
||||
<a href='{% url "company-detail-purchase-orders" company.id %}'>
|
||||
<span class='fas fa-shopping-cart'></span>
|
||||
{% trans "Purchase Orders" %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if company.is_customer %}
|
||||
<li class='list-group-item {% if tab == "so" %}active{% endif %}' title='{% trans "Sales Orders" %}'>
|
||||
<a href='{% url "company-detail-sales-orders" company.id %}'>
|
||||
<span class='fas fa-truck'></span>
|
||||
{% trans "Sales Orders" %}
|
||||
</a>
|
||||
</li>
|
||||
<li class='list-group-item {% if tab == "assigned" %}active{% endif %}' title='{% trans "Assigned Stock" %}'>
|
||||
<a href='{% url "company-detail-assigned-stock" company.id %}'>
|
||||
<span class='fas fa-sign-out-alt'></span>
|
||||
{% trans "Assigned Stock" %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
<li class='list-group-item {% if tab == "notes" %}active{% endif %}' titl='{% trans "Notes" %}'>
|
||||
<a href='{% url "company-notes" company.id %}'>
|
||||
<span class='fas fa-clipboard'></span>
|
||||
{% trans "Notes" %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
@ -1,14 +1,18 @@
|
||||
{% extends "company/company_base.html" %}
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
{% block details %}
|
||||
{% load markdownify %}
|
||||
|
||||
{% include 'company/tabs.html' with tab='notes' %}
|
||||
{% block menubar %}
|
||||
{% include 'company/navbar.html' with tab='notes' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block heading %}
|
||||
{% trans "Company Notes" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block details %}
|
||||
{% if editing %}
|
||||
<h4>{% trans "Company Notes" %}</h4>
|
||||
<hr>
|
||||
<form method='POST'>
|
||||
{% csrf_token %}
|
||||
|
||||
@ -22,20 +26,8 @@
|
||||
|
||||
{% else %}
|
||||
|
||||
<div class='row'>
|
||||
<div class='col-sm-6'>
|
||||
<h4>{% trans "Company Notes" %}</h4>
|
||||
</div>
|
||||
<div class='col-sm-6'>
|
||||
<button title='{% trans "Edit notes" %}' class='btn btn-default action-button float-right' id='edit-notes'><span class='fas fa-edit'></span></button>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class='panel panel-default'>
|
||||
<div class='panel-content'>
|
||||
{{ company.notes | markdownify }}
|
||||
</div>
|
||||
</div>
|
||||
<button title='{% trans "Edit notes" %}' class='btn btn-default action-button' id='edit-notes'><span class='fas fa-edit'></span></button>
|
||||
{{ company.notes | markdownify }}
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
@ -2,13 +2,16 @@
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block menubar %}
|
||||
{% include 'company/navbar.html' with tab='po' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block heading %}
|
||||
{% trans "Purchase Orders" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block details %}
|
||||
|
||||
{% include 'company/tabs.html' with tab='po' %}
|
||||
|
||||
<h4>{% trans "Purchase Orders" %}</h4>
|
||||
<hr>
|
||||
|
||||
{% if roles.purchase_order.add %}
|
||||
<div id='button-bar'>
|
||||
<div class='button-toolbar container-fluid' style='float: right;'>
|
||||
|
@ -2,13 +2,17 @@
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
|
||||
|
||||
{% block menubar %}
|
||||
{% include 'company/navbar.html' with tab='so' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block heading %}
|
||||
{% trans "Sales Orders" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block details %}
|
||||
|
||||
{% include 'company/tabs.html' with tab='co' %}
|
||||
|
||||
<h4>{% trans "Sales Orders" %}</h4>
|
||||
<hr>
|
||||
|
||||
{% if roles.sales_order.add %}
|
||||
<div id='button-bar'>
|
||||
<div class='button-toolbar container-fluid' style='float: right;'>
|
||||
|
@ -1,35 +0,0 @@
|
||||
{% load i18n %}
|
||||
|
||||
<ul class='nav nav-tabs'>
|
||||
<li{% if tab == 'details' %} class='active'{% endif %}>
|
||||
<a href="{% url 'company-detail' company.id %}">{% trans "Details" %}</a>
|
||||
</li>
|
||||
{% if company.is_supplier or company.is_manufacturer %}
|
||||
<li{% if tab == 'parts' %} class='active'{% endif %}>
|
||||
<a href="{% url 'company-detail-parts' company.id %}">{% trans "Parts" %} <span class='badge'>{{ company.part_count }}</span></a>
|
||||
</li>
|
||||
<li{% if tab == 'stock' %} class='active'{% endif %}>
|
||||
<a href="{% url 'company-detail-stock' company.id %}">{% trans "Stock" %} <span class='badge'>{{ company.stock_count }}</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if company.is_supplier %}
|
||||
<li{% if tab == 'po' %} class='active'{% endif %}>
|
||||
<a href="{% url 'company-detail-purchase-orders' company.id %}">{% trans "Purchase Orders" %} <span class='badge'>{{ company.purchase_orders.count }}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if company.is_customer %}
|
||||
<li{% if tab == 'co' %} class='active'{% endif %}>
|
||||
<a href="{% url 'company-detail-sales-orders' company.id %}">{% trans "Sales Orders" %} <span class='badge'>{{ company.sales_orders.count }}</span></a>
|
||||
</li>
|
||||
<li{% if tab == 'assigned' %} class='active'{% endif %}>
|
||||
<a href="{% url 'company-detail-assigned-stock' company.id %}">{% trans "Assigned Stock" %}
|
||||
<span class='badge'>
|
||||
{{ company.assigned_stock.count }}
|
||||
</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li{% if tab == 'notes' %} class='active'{% endif %}>
|
||||
<a href="{% url 'company-notes' company.id %}">{% trans "Notes" %}{% if company.notes %} <span class='fas fa-info-circle'></span>{% endif %}</a>
|
||||
</li>
|
||||
</ul>
|
Loading…
Reference in New Issue
Block a user