Sales order now uses menubar

This commit is contained in:
Oliver Walters 2021-02-24 20:17:25 +11:00
parent 213851e8aa
commit 3210af31b4
8 changed files with 79 additions and 59 deletions

View File

@ -67,7 +67,7 @@ src="{% static 'img/blank_image.png' %}"
{% block page_details %}
<h4>{% trans "Sales Order Details" %}</h4>
<table class='table'>
<table class='table table-striped table-condensed'>
<col width='25'>
<tr>
<td><span class='fas fa-hashtag'></span></td>
@ -135,6 +135,10 @@ src="{% static 'img/blank_image.png' %}"
{% block js_ready %}
{{ block.super }}
enableRightNavbar({
minWidth: '50px'
});
$("#edit-order").click(function() {
launchModalForm("{% url 'so-edit' order.id %}", {
reload: true,

View File

@ -5,13 +5,16 @@
{% load i18n %}
{% load static %}
{% block menubar %}
{% include "order/so_navbar.html" with tab='details' %}
{% endblock %}
{% block heading %}
{% trans "Sales Order Items" %}
{% endblock %}
{% block details %}
{% include "order/so_tabs.html" with tab='details' %}
<hr>
<h4>{% trans "Sales Order Items" %}</h4>
{% if roles.sales_order.change %}
<div id='order-toolbar-buttons' class='btn-group' style='float: right;'>

View File

@ -1,22 +1,22 @@
{% extends "order/sales_order_base.html" %}
{% load inventree_extras %}
{% load i18n %}
{% load static %}
{% load inventree_extras %}
{% load status_codes %}
{% load markdownify %}
{% load status_codes %}
{% block page_title %}
InvenTree | {% trans "Sales Order" %}
{% block menubar %}
{% include 'order/so_navbar.html' with tab='notes' %}
{% endblock %}
{% block heading %}
{% trans "Sales Order Notes" %}
{% endblock %}
{% block details %}
{% include "order/so_tabs.html" with tab='notes' %}
{% if editing %}
<h4>{% trans "Order Notes" %}</h4>
<hr>
<form method='POST'>
{% csrf_token %}
@ -29,15 +29,7 @@ InvenTree | {% trans "Sales Order" %}
{{ form.media }}
{% else %}
<div class='row'>
<div class='col-sm-6'>
<h4>{% trans "Order 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'>
{{ order.notes | markdownify }}

View File

@ -4,14 +4,16 @@
{% load i18n %}
{% load static %}
{% block menubar %}
{% include 'order/so_navbar.html' with tab='attachments' %}
{% endblock %}
{% block heading %}
{% trans "Sales Order Attachments" %}
{% endblock %}
{% block details %}
{% include 'order/so_tabs.html' with tab='attachments' %}
<h4>{% trans "Sales Order Attachments" %}</h4>
<hr>
{% include "attachment_table.html" with attachments=order.attachments.all %}
{% endblock %}

View File

@ -4,12 +4,16 @@
{% load i18n %}
{% load static %}
{% block menubar %}
{% include 'order/so_navbar.html' with tab='builds' %}
{% endblock %}
{% block heading %}
{% trans "Build Orders" %}
{% endblock %}
{% block details %}
{% include 'order/so_tabs.html' with tab='builds' %}
<h4>{% trans "Build Orders" %}</h4>
<hr>
<table class='table table-striped table-condensed' id='builds-table'></table>

View File

@ -0,0 +1,40 @@
{% load i18n %}
{% load static %}
{% load inventree_extras %}
<ul class='list-group'>
<li class='list-group-item'>
<a href='#' id='so-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 "Sales Order Details" %}'>
<a href='{% url "so-detail" order.id %}'>
<span class='fas fa-info-circle'></span>
{% trans "Details" %}
</a>
</li>
<li class='list-group-item {% if tab == "builds" %}active{% endif %}' title='{% trans "Build Orders" %}'>
<a href='{% url "so-builds" order.id %}'>
<span class='fas fa-tools'></span>
{% trans "Build Orders" %}
</a>
</li>
<li class='list-group-item {% if tab == "attachments" %}active{% endif %}' title='{% trans "Sales Order Attachments" %}'>
<a href='{% url "so-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 "so-notes" order.id %}'>
<span class='fas fa-clipboard'></span>
{% trans "Notes" %}
</a>
</li>
</ul>

View File

@ -1,25 +0,0 @@
{% load i18n %}
<ul class='nav nav-tabs'>
<li{% ifequal tab 'details' %} class='active'{% endifequal %}>
<a href="{% url 'so-detail' order.id %}">{% trans "Order Items" %}</a>
</li>
<li{% if tab == 'builds' %} class='active'{% endif %}>
<a href="{% url 'so-builds' order.id %}">
{% trans "Build Orders" %}
{% if order.builds.count > 0 %}
<span class='badge'>{{ order.builds.count }}</span>
{% endif %}
</a>
</li>
<li{% if tab == 'attachments' %} class='active'{% endif %}>
<a href="{% url 'so-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 'so-notes' order.id %}">{% trans "Notes" %}{% if order.notes %} <span class='fas fa-info-circle'></span>{% endif %}</a>
</li>
</ul>

View File

@ -4,7 +4,7 @@
{% load i18n %}
{% block menubar %}
<!-- Custom menubar goes here -->
<!-- Custom menubar code goes here -->
{% endblock %}
{% block content %}