mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Purchase Order now uses menu bar
This commit is contained in:
parent
bedfaa582c
commit
213851e8aa
@ -135,6 +135,10 @@ src="{% static 'img/blank_image.png' %}"
|
|||||||
{% block js_ready %}
|
{% block js_ready %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
|
|
||||||
|
enableRightNavbar({
|
||||||
|
minWidth: '50px'
|
||||||
|
});
|
||||||
|
|
||||||
{% if order.status == PurchaseOrderStatus.PENDING and order.lines.count > 0 %}
|
{% if order.status == PurchaseOrderStatus.PENDING and order.lines.count > 0 %}
|
||||||
$("#place-order").click(function() {
|
$("#place-order").click(function() {
|
||||||
launchModalForm("{% url 'po-issue' order.id %}",
|
launchModalForm("{% url 'po-issue' order.id %}",
|
||||||
|
@ -5,14 +5,17 @@
|
|||||||
{% load static %}
|
{% load static %}
|
||||||
{% load markdownify %}
|
{% load markdownify %}
|
||||||
|
|
||||||
|
{% block menubar %}
|
||||||
|
{% include 'order/po_navbar.html' with tab='notes' %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block heading %}
|
||||||
|
{% trans "Order Notes" %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block details %}
|
{% block details %}
|
||||||
|
|
||||||
{% include 'order/po_tabs.html' with tab='notes' %}
|
|
||||||
|
|
||||||
{% if editing %}
|
{% if editing %}
|
||||||
<h4>{% trans "Order Notes" %}</h4>
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<form method='POST'>
|
<form method='POST'>
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
|
|
||||||
@ -24,25 +27,16 @@
|
|||||||
{{ form.media }}
|
{{ form.media }}
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class='row'>
|
|
||||||
<div class='col-sm-6'>
|
|
||||||
<h4>{% trans "Order Notes" %}</h4>
|
|
||||||
</div>
|
|
||||||
{% if roles.purchase_order.change %}
|
{% if roles.purchase_order.change %}
|
||||||
<div class='col-sm-6'>
|
<button title='{% trans "Edit notes" %}' class='btn btn-default action-button' id='edit-notes'><span class='fas fa-edit'></span></button>
|
||||||
<button title='{% trans "Edit notes" %}' class='btn btn-default action-button float-right' id='edit-notes'><span class='fas fa-edit'></span></button>
|
{% endif %}
|
||||||
</div>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
|
||||||
<hr>
|
|
||||||
<div class='panel panel-default'>
|
<div class='panel panel-default'>
|
||||||
<div class='panel-content'>
|
<div class='panel-content'>
|
||||||
{{ order.notes | markdownify }}
|
{{ order.notes | markdownify }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block js_ready %}
|
{% block js_ready %}
|
||||||
|
@ -4,14 +4,15 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load static %}
|
{% load static %}
|
||||||
|
|
||||||
|
{% block menubar %}
|
||||||
|
{% include 'order/po_navbar.html' with tab='attachments' %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block heading %}
|
||||||
|
{% trans "Purchase Order Attachments" %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block details %}
|
{% block details %}
|
||||||
|
|
||||||
{% include 'order/po_tabs.html' with tab='attachments' %}
|
|
||||||
|
|
||||||
<h4>{% trans "Purchase Order Attachments" %}</h4>
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
{% include "attachment_table.html" with attachments=order.attachments.all %}
|
{% include "attachment_table.html" with attachments=order.attachments.all %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
35
InvenTree/order/templates/order/po_navbar.html
Normal file
35
InvenTree/order/templates/order/po_navbar.html
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
{% load i18n %}
|
||||||
|
{% load static %}
|
||||||
|
{% load inventree_extras %}
|
||||||
|
|
||||||
|
<ul class='list-group'>
|
||||||
|
<li class='list-group-item'>
|
||||||
|
<a href='#' id='po-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 "Purchase Order Details" %}'>
|
||||||
|
<a href='{% url "po-detail" order.id %}'>
|
||||||
|
<span class='fas fa-info-circle'></span>
|
||||||
|
{% trans "Details" %}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class='list-group-item {% if tab == "received" %}active{% endif %}' title='{% trans "Received Stock Items" %}'>
|
||||||
|
<a href='{% url "po-received" order.id %}'>
|
||||||
|
<span class='fas fa-sign-in-alt'></span>
|
||||||
|
{% trans "Received Items" %}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class='list-group-item {% if tab == "attachments" %}active{% endif %}' title='{% trans "Purchase Order Attachments" %}'>
|
||||||
|
<a href='{% url "po-attachments" order.id %}'>
|
||||||
|
<span class='fas fa-paperclip'></span>
|
||||||
|
{% trans "Attachments" %}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
<li class='list-group-item {% if tab == "notes" %}active{% endif %}' title='{% trans "Notes" %}'>
|
||||||
|
<a href='{% url "po-notes" order.id %}'>
|
||||||
|
<span class='fas fa-clipboard'></span>
|
||||||
|
{% trans "Notes" %}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
@ -4,13 +4,16 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load static %}
|
{% load static %}
|
||||||
|
|
||||||
|
{% block menubar %}
|
||||||
|
{% include 'order/po_navbar.html' with tab='received' %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block heading %}
|
||||||
|
{% trans "Received Items" %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block details %}
|
{% block details %}
|
||||||
|
|
||||||
{% include 'order/po_tabs.html' with tab='received' %}
|
|
||||||
|
|
||||||
<h4>{% trans "Received Items" %}</h4>
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
{% include "stock_table.html" with read_only=True %}
|
{% include "stock_table.html" with read_only=True %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
{% load i18n %}
|
|
||||||
|
|
||||||
<ul class='nav nav-tabs'>
|
|
||||||
<li{% ifequal tab 'details' %} class='active'{% endifequal %}>
|
|
||||||
<a href="{% url 'po-detail' order.id %}">{% trans "Line Items" %}</a>
|
|
||||||
</li>
|
|
||||||
<li {% if tab == 'received' %} class='active'{% endif %}>
|
|
||||||
<a href="{% url 'po-received' order.id %}">{% trans "Received Items" %}</a>
|
|
||||||
</li>
|
|
||||||
<li{% if tab == 'attachments' %} class='active'{% endif %}>
|
|
||||||
<a href="{% url 'po-attachments' order.id %}">{% trans "Attachments" %}
|
|
||||||
{% if order.attachments.count > 0 %}
|
|
||||||
<span class='badge'>{{ order.attachments.count }}</span>
|
|
||||||
{% endif %}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<li{% ifequal tab 'notes' %} class='active'{% endifequal %}>
|
|
||||||
<a href="{% url 'po-notes' order.id %}">{% trans "Notes" %}{% if order.notes %} <span class='fas fa-info-circle'></span>{% endif %}</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
@ -5,11 +5,18 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load static %}
|
{% load static %}
|
||||||
|
|
||||||
|
{% block menubar %}
|
||||||
|
{% include 'order/po_navbar.html' with tab='details' %}
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block heading %}
|
||||||
|
{% trans "Purchase Order Items" %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
{% block details %}
|
{% block details %}
|
||||||
|
|
||||||
{% include 'order/po_tabs.html' with tab='details' %}
|
|
||||||
|
|
||||||
<hr>
|
|
||||||
|
|
||||||
<div id='order-toolbar-buttons' class='btn-group' style='float: right;'>
|
<div id='order-toolbar-buttons' class='btn-group' style='float: right;'>
|
||||||
{% if order.status == PurchaseOrderStatus.PENDING and roles.purchase_order.change %}
|
{% if order.status == PurchaseOrderStatus.PENDING and roles.purchase_order.change %}
|
||||||
@ -18,7 +25,6 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h4>{% trans "Purchase Order Items" %}</h4>
|
|
||||||
|
|
||||||
<table class='table table-striped table-condensed' id='po-table' data-toolbar='#order-toolbar-buttons'>
|
<table class='table table-striped table-condensed' id='po-table' data-toolbar='#order-toolbar-buttons'>
|
||||||
</table>
|
</table>
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
<li class='list-group-item'>
|
<li class='list-group-item'>
|
||||||
<a href='#' id='part-menu-toggle'>
|
<a href='#' id='part-menu-toggle'>
|
||||||
<span class='menu-tab-icon fas fa-expand-arrows-alt'></span>
|
<span class='menu-tab-icon fas fa-expand-arrows-alt'></span>
|
||||||
<b>{% trans "Part" %}</b>
|
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class='list-group-item {% if tab == "details" %}active{% endif %}' title='{% trans "Part Details" %}'>
|
<li class='list-group-item {% if tab == "details" %}active{% endif %}' title='{% trans "Part Details" %}'>
|
||||||
|
@ -3,8 +3,14 @@
|
|||||||
{% load static %}
|
{% load static %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
|
{% block menubar %}
|
||||||
|
<!-- Custom menubar goes here -->
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
|
<div class='panel panel-default panel-inventree'>
|
||||||
|
|
||||||
<div class='row'>
|
<div class='row'>
|
||||||
<div class='col-sm-6'>
|
<div class='col-sm-6'>
|
||||||
<div class='media-left'>
|
<div class='media-left'>
|
||||||
@ -24,14 +30,23 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<hr>
|
<div class='panel panel-default panel-inventree'>
|
||||||
|
<div class='panel-heading'>
|
||||||
|
<h4>
|
||||||
|
{% block heading %}
|
||||||
|
<!-- Heading goes here -->
|
||||||
|
{% endblock %}
|
||||||
|
</h4>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class='container-fluid'>
|
<div class='panel-content'>
|
||||||
{% block details %}
|
{% block details %}
|
||||||
<!-- Particular page detail views go here -->
|
<!-- Particular page detail views go here -->
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user