mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +00:00
Clean up display of company pages
- Add some more buttons - visual style consolidation
This commit is contained in:
parent
7effe3af9d
commit
3e6cdb15be
@ -25,11 +25,16 @@ InvenTree | Company - {{ company.name }}
|
|||||||
<h4>{{ company.name }}</h4>
|
<h4>{{ company.name }}</h4>
|
||||||
<p>{{ company.description }}</p>
|
<p>{{ company.description }}</p>
|
||||||
<div class='btn-group'>
|
<div class='btn-group'>
|
||||||
|
{% if company.is_supplier %}
|
||||||
|
<button type='button' class='btn btn-default btn-glyph' id='company-order' title='Create purchase order'>
|
||||||
|
<span class='glyphicon glyphicon-shopping-cart'/>
|
||||||
|
</button>
|
||||||
|
{% endif %}
|
||||||
<button type='button' class='btn btn-default btn-glyph' id='company-edit' title='Edit company information'>
|
<button type='button' class='btn btn-default btn-glyph' id='company-edit' title='Edit company information'>
|
||||||
<span class='glyphicon glyphicon-cog'/>
|
<span class='glyphicon glyphicon-cog'/>
|
||||||
</button>
|
</button>
|
||||||
<button type='button' class='btn btn-default btn-glyph' id='company-delete' title='Edit company information'>
|
<button type='button' class='btn btn-default btn-glyph' id='company-delete' title='Delete company'>
|
||||||
<span class='glyphicon glyphicon-trash'/>
|
<span class='glyphicon glyphicon-trash' style='color: #a11;'/>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
|
|
||||||
<h4>Supplier Parts</h4>
|
<h4>Supplier Parts</h4>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
<div id='button-toolbar'>
|
<div id='button-toolbar'>
|
||||||
<button class="btn btn-success" id='part-create'>New Supplier Part</button>
|
<button class="btn btn-success" id='part-create'>New Supplier Part</button>
|
||||||
<div class="dropdown" style="float: right;">
|
<div class="dropdown" style="float: right;">
|
||||||
|
@ -5,14 +5,15 @@
|
|||||||
{% include 'company/tabs.html' with tab='po' %}
|
{% include 'company/tabs.html' with tab='po' %}
|
||||||
|
|
||||||
<h4>Open Purchase Orders</h4>
|
<h4>Open Purchase Orders</h4>
|
||||||
|
<hr>
|
||||||
|
|
||||||
<div class='container' style='float: right;'>
|
<div id='button-bar'>
|
||||||
<div class='btn-group'>
|
<div class='btn-group'>
|
||||||
<button class='btn btn-primary' type='button' id='po-create' title='Create new purchase order'>New Purchase Order</button>
|
<button class='btn btn-primary' type='button' id='company-order-2' title='Create new purchase order'>New Purchase Order</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% include "order/po_table.html" with orders=company.outstanding_purchase_orders.all %}
|
{% include "order/po_table.html" with orders=company.outstanding_purchase_orders.all toolbar='#button-bar' %}
|
||||||
|
|
||||||
{% if company.closed_purchase_orders.count > 0 %}
|
{% if company.closed_purchase_orders.count > 0 %}
|
||||||
{% include "order/po_table_collapse.html" with title="Closed Orders" orders=company.closed_purchase_orders.all %}
|
{% include "order/po_table_collapse.html" with title="Closed Orders" orders=company.closed_purchase_orders.all %}
|
||||||
@ -23,15 +24,27 @@
|
|||||||
{% block js_ready %}
|
{% block js_ready %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
|
|
||||||
$("#po-create").click(function() {
|
function newOrder() {
|
||||||
launchModalForm("{% url 'purchase-order-create' %}",
|
launchModalForm("{% url 'purchase-order-create' %}",
|
||||||
{
|
{
|
||||||
data: {
|
data: {
|
||||||
supplier: {{ company.id }},
|
supplier: {{ company.id }},
|
||||||
},
|
},
|
||||||
follow: true,
|
follow: true,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
);
|
|
||||||
});
|
$("#company-order").click(function() {
|
||||||
|
newOrder();
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#company-order-2").click(function() {
|
||||||
|
newOrder();
|
||||||
|
});
|
||||||
|
|
||||||
|
$("#po-table").bootstrapTable({
|
||||||
|
search: true,
|
||||||
|
sortable: true,
|
||||||
|
});
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
@ -7,6 +7,8 @@
|
|||||||
|
|
||||||
<h4>Supplier Stock</h4>
|
<h4>Supplier Stock</h4>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
|
||||||
{% include "stock_table.html" %}
|
{% include "stock_table.html" %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
<table class='table table-striped table-condensed' id='po-table'>
|
<table class='table table-striped table-condensed' id='po-table' {% if toolbar %}data-toolbar='{{ toolbar }}'{% endif %}>
|
||||||
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th data-field='company'>Company</th>
|
<th data-field='company' data-searchable='true'>Company</th>
|
||||||
<th data-field='reference'>Order Reference</th>
|
<th data-field='reference' data-searchable='true'>Order Reference</th>
|
||||||
<th data-field='description'>Description</th>
|
<th data-field='description' data-searchable='true'>Description</th>
|
||||||
<th data-field='status'>Status</th>
|
<th data-field='status'>Status</th>
|
||||||
<th data-field='items'>Items</th>
|
<th data-field='items'>Items</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
{% for order in orders %}
|
{% for order in orders %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{% include "hover_image.html" with image=order.supplier.image hover=True %}<a href="{{ order.supplier.get_absolute_url }}purchase-orders/">{{ order.supplier.name }}</a></td>
|
<td>{% include "hover_image.html" with image=order.supplier.image hover=True %}<a href="{{ order.supplier.get_absolute_url }}purchase-orders/">{{ order.supplier.name }}</a></td>
|
||||||
@ -15,4 +18,5 @@
|
|||||||
<td>{{ order.lines.count }}</td>
|
<td>{{ order.lines.count }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
</tbody>
|
||||||
</table>
|
</table>
|
@ -158,6 +158,10 @@
|
|||||||
.navigation {
|
.navigation {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nav-tabs {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
.breadcrump {
|
.breadcrump {
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user