Migrate more pages to the two_column template

This commit is contained in:
Oliver Walters 2020-04-22 09:50:10 +10:00
parent 808a636484
commit 372958d939
7 changed files with 457 additions and 485 deletions

View File

@ -19,7 +19,9 @@ InvenTree | {% trans "Company" %} - {{ company.name }}
{% endblock %}
{% block page_data %}
<h3>{{ company.name }}</h3>
<h3>{% trans "Company" %}</h3>
<hr>
<h4>{{ company.name }}</h4>
<p>{{ company.description }}</p>
<div class='btn-group'>
{% if company.is_supplier %}

View File

@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "two_column.html" %}
{% load static %}
{% load i18n %}
@ -6,22 +6,19 @@
InvenTree | {% trans "Supplier Part" %}
{% endblock %}
{% block content %}
{% block thumbnail %}
<img class='part-thumb'
{% if part.part.image %}
src='{{ part.part.image.url }}'
{% else %}
src="{% static 'img/blank_image.png' %}"
{% endif %}/>
{% endblock %}
<div class='row'>
<div class='col-sm-6'>
<div class='media'>
<div class='media-left'>
<img class='part-thumb'
{% if part.part.image %}
src='{{ part.part.image.url }}'
{% else %}
src="{% static 'img/blank_image.png' %}"
{% endif %}/>
</div>
<div class='media-body'>
<h3>{% trans "Supplier Part" %}</h3>
<div class='btn-row'>
{% block page_data %}
<h3>{% trans "Supplier Part" %}</h3>
<p>{{ part.supplier.name }} - {{ part.SKU }}</p>
<div class='btn-row'>
<div class='btn-group'>
<button type='button' class='btn btn-default btn-glyph' id='edit-part' title='Edit supplier part'>
<span class='glyphicon glyphicon-edit'/>
@ -30,13 +27,13 @@ InvenTree | {% trans "Supplier Part" %}
<span class='glyphicon glyphicon-trash'/>
</button>
</div>
</div>
</div>
</div>
</div>
<div class='col-sm-6'>
<h4>{% trans "Supplier Part Details" %}</h4>
<table class="table table-striped table-condensed">
</div>
{% endblock %}
{% block page_details %}
<h4>{% trans "Supplier Part Details" %}</h4>
<table class="table table-striped table-condensed">
<col width='25'>
<tr>
<td><span class='fas fa-shapes'></span></td>
@ -88,22 +85,7 @@ InvenTree | {% trans "Supplier Part" %}
<td>{{ part.note }}</td>
</tr>
{% endif %}
</table>
</div>
</div>
<hr>
<div class='container-fluid'>
{% block details %}
<!-- Particular SupplierPart page goes here ... -->
{% endblock %}
</div>
</table>
{% endblock %}
{% block js_ready %}

View File

@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "two_column.html" %}
{% load i18n %}
{% load static %}
@ -9,24 +9,22 @@
InvenTree | {% trans "Purchase Order" %}
{% endblock %}
{% block content %}
{% block thumbnail %}
<img class='part-thumb'
{% if order.supplier.image %}
src="{{ order.supplier.image.url }}"
{% else %}
src="{% static 'img/blank_image.png' %}"
{% endif %}
/>
{% endblock %}
<div class='row'>
<div class='col-sm-6'>
<div class='media'>
<div class='media-left'>
<img class='part-thumb'
{% if order.supplier.image %}
src="{{ order.supplier.image.url }}"
{% else %}
src="{% static 'img/blank_image.png' %}"
{% endif %}
/>
</div>
<div class='media-body'>
<h4>{{ order }}</h4>
<p>{{ order.description }}</p>
<p>
{% block page_data %}
<h3>{% trans "Purchase Order" %}</h3>
<hr>
<h4>{{ order }}</h4>
<p>{{ order.description }}</p>
<p>
<div class='btn-row'>
<div class='btn-group'>
<button type='button' class='btn btn-default btn-glyph' id='edit-order' title='Edit order information'>
@ -54,13 +52,12 @@ InvenTree | {% trans "Purchase Order" %}
{% endif %}
</div>
</div>
</p>
</div>
</div>
</div>
<div class='col-sm-6'>
<h4>{% trans "Purchase Order Details" %}</h4>
<table class='table'>
</p>
{% endblock %}
{% block page_details %}
<h4>{% trans "Purchase Order Details" %}</h4>
<table class='table'>
<col width='25'>
<tr>
<td><span class='fas fa-hashtag'></span></td>
@ -110,19 +107,7 @@ InvenTree | {% trans "Purchase Order" %}
<td>{{ order.complete_date }}<span class='badge'>{{ order.received_by }}</span></td>
</tr>
{% endif %}
</table>
</div>
</div>
<hr>
<div class='container-fluid'>
{% block details %}
<!-- Specific order details to go here -->
{% endblock %}
</div>
</table>
{% endblock %}
{% block js_ready %}

View File

@ -1,4 +1,4 @@
{% extends "base.html" %}
{% extends "two_column.html" %}
{% load i18n %}
{% load static %}
@ -9,39 +9,33 @@
InvenTree | {% trans "Sales Order" %}
{% endblock %}
{% block content %}
{% block thumbnail %}
<img class='part-thumb'
{% if order.customer.image %}
src="{{ order.customer.image.url }}"
{% else %}
src="{% static 'img/blank_image.png' %}"
{% endif %}
/>
{% endblock %}
<div class='row'>
<div class='col-sm-6'>
<div class='media'>
<div class='media-left'>
<img class='part-thumb'
{% if order.customer.image %}
src="{{ order.customer.image.url }}"
{% else %}
src="{% static 'img/blank_image.png' %}"
{% endif %}
/>
</div>
<div class='media-body'>
<h3>{{ order }}</h3>
<p>{{ order.description }}</p>
<p>
<div class='btn-row'>
{% block page_data %}
<h3>{% trans "Sales Order" %}</h3>
<hr>
<h4>{{ order }}</h4>
<p>{{ order.description }}</p>
<div class='btn-row'>
<div class='btn-group'>
<button type='button' class='btn btn-default btn-glyph' id='edit-order' title='Edit order information'>
<span class='glyphicon glyphicon-edit'></span>
</button>
</div>
</div>
</p>
</div>
</div>
</div>
<div class='col-sm-6'>
<h4>{% trans "Sales Order Details" %}</h4>
<table class='table'>
</div>
{% endblock %}
{% block page_details %}
<h4>{% trans "Sales Order Details" %}</h4>
<table class='table'>
<col width='25'>
<tr>
<td><span class='fas fa-hashtag'></span></td>
@ -91,17 +85,7 @@ InvenTree | {% trans "Sales Order" %}
<td>{{ order.complete_date }}<span class='badge'>{{ order.received_by }}</span></td>
</tr>
{% endif %}
</table>
</div>
</div>
<hr>
<div class='container-fluid'>
{% block details %}
<!-- sales order details go here -->
{% endblock %}
</div>
</table>
{% endblock %}
{% block js_ready %}

View File

@ -1,9 +1,19 @@
{% extends "stock/stock_app_base.html" %}
{% extends "two_column.html" %}
{% load static %}
{% load inventree_extras %}
{% load status_codes %}
{% load i18n %}
{% block content %}
{% block page_title %}
InvenTree | {% trans "Stock Item" %} - {{ item }}
{% endblock %}
{% block sidenav %}
<div id='stock-tree'></div>
{% endblock %}
{% block pre_content %}
{% include 'stock/loc_link.html' with location=item.location %}
{% if item.sales_order_line %}
<div class='alert alert-block alert-info'>
@ -12,16 +22,43 @@
</div>
{% endif %}
<div class='row'>
<div class='col-sm-6'>
<h3>{% trans "Stock Item Details" %}</h3>
{% if item.serialized %}
<p><i>{{ item.part.full_name}} # {{ item.serial }}</i></p>
{% else %}
<p><i>{% decimal item.quantity %} &times {{ item.part.full_name }}</i></p>
{% endif %}
<p>
<div class='btn-group'>
{% if item.serialized %}
<div class='alert alert-block alert-info'>
{% trans "This stock item is serialized - it has a unique serial number and the quantity cannot be adjusted." %}
</div>
{% elif item.child_count > 0 %}
<div class='alert alert-block alert-warning'>
{% trans "This stock item cannot be deleted as it has child items" %}
</div>
{% elif item.delete_on_deplete %}
<div class='alert alert-block alert-warning'>
{% trans "This stock item will be automatically deleted when all stock is depleted." %}
</div>
{% endif %}
{% if item.parent %}
<div class='alert alert-block alert-info'>
{% trans "This stock item was split from " %}<a href="{% url 'stock-item-detail' item.parent.id %}">{{ item.parent }}</a>
</div>
{% endif %}
{% endblock %}
{% block thumbnail %}
<img class='part-thumb' {% if item.part.image %}src="{{ item.part.image.url }}"{% else %}src="{% static 'img/blank_image.png' %}"{% endif %}/>
{% endblock %}
{% block page_data %}
<h3>{% trans "Stock Item" %}</h3>
<hr>
<h4>
{% if item.serialized %}
{{ item.part.full_name}} # {{ item.serial }}
{% else %}
{% decimal item.quantity %} &times {{ item.part.full_name }}
{% endif %}
</h4>
<div class='btn-group'>
{% include "qr_button.html" %}
{% if item.in_stock %}
{% if not item.serialized %}
@ -55,31 +92,13 @@
<span class='glyphicon glyphicon-trash'/>
</button>
{% endif %}
</div>
</p>
{% if item.serialized %}
<div class='alert alert-block alert-info'>
{% trans "This stock item is serialized - it has a unique serial number and the quantity cannot be adjusted." %}
</div>
{% elif item.child_count > 0 %}
<div class='alert alert-block alert-warning'>
{% trans "This stock item cannot be deleted as it has child items" %}
</div>
{% elif item.delete_on_deplete %}
<div class='alert alert-block alert-warning'>
{% trans "This stock item will be automatically deleted when all stock is depleted." %}
</div>
{% endif %}
{% if item.parent %}
<div class='alert alert-block alert-info'>
{% trans "This stock item was split from " %}<a href="{% url 'stock-item-detail' item.parent.id %}">{{ item.parent }}</a>
</div>
{% endif %}
</div>
</div>
<div class='row'>
<div class='col-sm-6'>
<table class="table table-striped">
{% endblock %}
{% block page_details %}
<h4>{% trans "Stock Item Details" %}</h4>
<table class="table table-striped">
<col width='25'>
<tr>
<td><span class='fas fa-shapes'></span></td>
@ -188,24 +207,27 @@
<td>{% trans "Status" %}</td>
<td>{% stock_status item.status %}</td>
</tr>
</table>
</div>
</div>
<hr>
<div class='container-fluid'>
{% block details %}
<!-- Stock item details go here -->
{% endblock %}
</div>
</table>
{% endblock %}
{% block js_ready %}
{{ block.super }}
loadTree("{% url 'api-stock-tree' %}",
"#stock-tree",
{
name: 'stock',
}
);
$("#toggle-stock-tree").click(function() {
toggleSideNav("#sidenav");
return false;
})
initSideNav();
$("#stock-serialize").click(function() {
launchModalForm(
"{% url 'stock-item-serialize' item.id %}",

View File

@ -3,9 +3,7 @@
{% load i18n %}
{% block page_title %}
{% if item %}
InvenTree | {% trans "Stock Item" %} - {{ item }}
{% elif location %}
{% if location %}
InvenTree | {% trans "Stock Location" %} - {{ location }}
{% else %}
InvenTree | Stock

View File

@ -17,7 +17,6 @@
<!-- Data next to image goes here -->
{% endblock %}
</div>
</div>
<div class='col-sm-6'>
{% block page_details %}