mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Build view now uses menubar
This commit is contained in:
parent
48d2a395de
commit
ef84b98a89
@ -7,14 +7,15 @@
|
||||
InvenTree | Allocate Parts
|
||||
{% endblock %}
|
||||
|
||||
{% block menubar %}
|
||||
{% include "build/navbar.html" with tab='allocate' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block heading %}
|
||||
{% trans "Incomplete Build Ouputs" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block details %}
|
||||
|
||||
{% include "build/tabs.html" with tab='allocate' %}
|
||||
|
||||
<h4>{% trans "Incomplete Build Ouputs" %}</h4>
|
||||
|
||||
<hr>
|
||||
|
||||
{% if build.is_complete %}
|
||||
<div class='alert alert-block alert-success'>
|
||||
{% trans "Build order has been completed" %}
|
||||
|
@ -4,13 +4,15 @@
|
||||
{% load i18n %}
|
||||
{% load markdownify %}
|
||||
|
||||
{% block menubar %}
|
||||
{% include "build/navbar.html" with tab='attachments' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block heading %}
|
||||
{% trans "Attachments" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block details %}
|
||||
|
||||
{% include "build/tabs.html" with tab='attachments' %}
|
||||
|
||||
<h4>{% trans "Attachments" %}</h4>
|
||||
<hr>
|
||||
|
||||
{% include "attachment_table.html" with attachments=build.attachments.all %}
|
||||
|
||||
{% endblock %}
|
||||
|
@ -148,6 +148,10 @@ src="{% static 'img/blank_image.png' %}"
|
||||
|
||||
{% block js_ready %}
|
||||
|
||||
enableRightNavbar({
|
||||
minWidth: '50px'
|
||||
});
|
||||
|
||||
$("#build-edit").click(function () {
|
||||
launchModalForm("{% url 'build-edit' build.id %}",
|
||||
{
|
||||
|
@ -2,14 +2,16 @@
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block menubar %}
|
||||
{% include "build/navbar.html" with tab="children" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block heading %}
|
||||
{% trans "Child Build Orders" %}
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block details %}
|
||||
|
||||
{% include "build/tabs.html" with tab="children" %}
|
||||
|
||||
<h4>{% trans "Child Build Orders" %}</h4>
|
||||
|
||||
<hr>
|
||||
|
||||
<div id='button-toolbar'>
|
||||
<div class='button-toolbar container-fluid float-right'>
|
||||
<div class='filter-list' id='filter-list-sub-build'>
|
||||
|
@ -2,13 +2,16 @@
|
||||
{% load static %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block menubar %}
|
||||
{% include "build/navbar.html" with tab='output' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block heading %}
|
||||
{% trans "Build Outputs" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block details %}
|
||||
|
||||
{% include "build/tabs.html" with tab='output' %}
|
||||
|
||||
<h4>{% trans "Build Outputs" %}</h4>
|
||||
<hr>
|
||||
|
||||
{% include "stock_table.html" with read_only=True %}
|
||||
|
||||
{% endblock %}
|
||||
|
@ -3,14 +3,15 @@
|
||||
{% load i18n %}
|
||||
{% load status_codes %}
|
||||
|
||||
{% block menubar %}
|
||||
{% include "build/navbar.html" with tab='details' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block heading %}
|
||||
{% trans "Build Details" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block details %}
|
||||
|
||||
{% include "build/tabs.html" with tab='details' %}
|
||||
|
||||
<h4>{% trans "Build Details" %}</h4>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class='row'>
|
||||
<div class='col-sm-6'>
|
||||
<table class='table table-striped'>
|
||||
|
64
InvenTree/build/templates/build/navbar.html
Normal file
64
InvenTree/build/templates/build/navbar.html
Normal file
@ -0,0 +1,64 @@
|
||||
{% 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 {% if tab == "details" %}active{% endif %}' title='{% trans "Build Order Details" %}'>
|
||||
<a href='{% url "build-detail" build.id %}'>
|
||||
<span class='fas fa-info-circle'></span>
|
||||
{% trans "Details" %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% if build.active %}
|
||||
<li class='list-group-item {% if tab == "parts" %}active{% endif %}' title='{% trans "Required Parts" %}'>
|
||||
<a href='{% url "build-parts" build.id %}'>
|
||||
<span class='fas fa-shapes'></span>
|
||||
{% trans "Required Parts" %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class='list-group-item {% if tab == "allocate" %}active{% endif %}' title='{% trans "In Progress" %}'>
|
||||
<a href='{% url "build-allocate" build.id %}'>
|
||||
<span class='fas fa-tools'></span>
|
||||
{% trans "In Progress" %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
<li class='list-group-item {% if tab == "output" %}active{% endif %}' title='{% trans "Build Outputs" %}'>
|
||||
<a href='{% url "build-output" build.id %}'>
|
||||
<span class='fas fa-box'></span>
|
||||
{% trans "Build Outputs" %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class='list-group-item {% if tab == "children" %}active{% endif %}' title='{% trans "Child Build Orders" %}'>
|
||||
<a href='{% url "build-children" build.id %}'>
|
||||
<span class='fas fa-sitemap'></span>
|
||||
{% trans "Child Builds" %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class='list-group-item {% if tab == "attachments" %}active{% endif %}' title='{% trans "Attachments" %}'>
|
||||
<a href='{% url "build-attachments" build.id %}'>
|
||||
<span class='fas fa-paperclip'></span>
|
||||
{% trans "Attachments" %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class='list-group-item {% if tab == "notes" %}active{% endif %}' title='{% trans "Build Order Notes" %}'>
|
||||
<a href='{% url "build-notes" build.id %}'>
|
||||
<span class='fas fa-clipboard'></span>
|
||||
{% trans "Notes" %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
|
@ -4,13 +4,16 @@
|
||||
{% load i18n %}
|
||||
{% load markdownify %}
|
||||
|
||||
{% block menubar %}
|
||||
{% include "build/navbar.html" with tab='notes' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block heading %}
|
||||
{% trans "Build Notes" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block details %}
|
||||
|
||||
{% include "build/tabs.html" with tab='notes' %}
|
||||
|
||||
|
||||
{% if editing %}
|
||||
<h4>{% trans "Build Notes" %}</h4>
|
||||
<hr>
|
||||
<form method='POST'>
|
||||
{% csrf_token %}
|
||||
@ -24,21 +27,9 @@
|
||||
{{ form.media }}
|
||||
|
||||
{% else %}
|
||||
<button title='{% trans "Edit notes" %}' class='btn btn-default action-button' id='edit-notes'><span class='fas fa-edit'></span></button>
|
||||
|
||||
<div class='row'>
|
||||
<div class='col-sm-6'>
|
||||
<h4>{% trans "Build 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'>
|
||||
{{ build.notes | markdownify }}
|
||||
</div>
|
||||
</div>
|
||||
{{ build.notes | markdownify }}
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
|
@ -3,13 +3,15 @@
|
||||
{% load i18n %}
|
||||
{% load status_codes %}
|
||||
|
||||
{% block menubar %}
|
||||
{% include "build/navbar.html" with tab='parts' %}
|
||||
{% endblock %}
|
||||
|
||||
{% block heading %}
|
||||
{% trans "Required Parts" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block details %}
|
||||
|
||||
{% include "build/tabs.html" with tab='parts' %}
|
||||
|
||||
<h4>{% trans "Build Parts" %}</h4>
|
||||
<hr>
|
||||
|
||||
<table class='table table-striped table-condensed' id='parts-table'></table>
|
||||
|
||||
{% endblock %}
|
||||
|
@ -1,44 +0,0 @@
|
||||
{% load i18n %}
|
||||
|
||||
<ul class='nav nav-tabs'>
|
||||
<li{% if tab == 'details' %} class='active'{% endif %}>
|
||||
<a href="{% url 'build-detail' build.id %}">{% trans "Details" %}</a>
|
||||
</li>
|
||||
{% if build.active %}
|
||||
<li {% if tab == 'parts' %} class='active'{% endif %}>
|
||||
<a href='{% url "build-parts" build.id %}'>
|
||||
{% trans "Required Parts" %}
|
||||
<span class='badge'>{{ build.part.bom_count }}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li{% if tab == 'allocate' %} class='active'{% endif %}>
|
||||
<a href="{% url 'build-allocate' build.id %}">
|
||||
{% trans "In Progress" %}
|
||||
<span class='badge'>{{ build.incomplete_outputs.count }}</span>
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li{% if tab == 'output' %} class='active'{% endif %}>
|
||||
<a href="{% url 'build-output' build.id %}">
|
||||
{% trans "Completed Outputs" %}
|
||||
<span class='badge'>{{ build.output_count }}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li {% if tab == 'children' %} class='active'{% endif %}>
|
||||
<a href='{% url "build-children" build.id %}'>
|
||||
{% trans "Child Builds" %}
|
||||
<span class='badge'>{{ build.sub_build_count }}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li{% if tab == 'notes' %} class='active'{% endif %}>
|
||||
<a href="{% url 'build-notes' build.id %}">
|
||||
{% trans "Notes" %}
|
||||
{% if build.notes %} <span class='fas fa-info-circle'></span>{% endif %}
|
||||
</a>
|
||||
</li>
|
||||
<li {% if tab == 'attachments' %} class='active'{% endif %}>
|
||||
<a href='{% url "build-attachments" build.id %}'>
|
||||
{% trans "Attachments" %}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
Loading…
Reference in New Issue
Block a user