mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +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>
|
||||
<p>{{ company.description }}</p>
|
||||
<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'>
|
||||
<span class='glyphicon glyphicon-cog'/>
|
||||
</button>
|
||||
<button type='button' class='btn btn-default btn-glyph' id='company-delete' title='Edit company information'>
|
||||
<span class='glyphicon glyphicon-trash'/>
|
||||
<button type='button' class='btn btn-default btn-glyph' id='company-delete' title='Delete company'>
|
||||
<span class='glyphicon glyphicon-trash' style='color: #a11;'/>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -6,6 +6,8 @@
|
||||
|
||||
<h4>Supplier Parts</h4>
|
||||
|
||||
<hr>
|
||||
|
||||
<div id='button-toolbar'>
|
||||
<button class="btn btn-success" id='part-create'>New Supplier Part</button>
|
||||
<div class="dropdown" style="float: right;">
|
||||
|
@ -5,14 +5,15 @@
|
||||
{% include 'company/tabs.html' with tab='po' %}
|
||||
|
||||
<h4>Open Purchase Orders</h4>
|
||||
<hr>
|
||||
|
||||
<div class='container' style='float: right;'>
|
||||
<div id='button-bar'>
|
||||
<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>
|
||||
|
||||
{% 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 %}
|
||||
{% include "order/po_table_collapse.html" with title="Closed Orders" orders=company.closed_purchase_orders.all %}
|
||||
@ -23,15 +24,27 @@
|
||||
{% block js_ready %}
|
||||
{{ block.super }}
|
||||
|
||||
$("#po-create").click(function() {
|
||||
launchModalForm("{% url 'purchase-order-create' %}",
|
||||
function newOrder() {
|
||||
launchModalForm("{% url 'purchase-order-create' %}",
|
||||
{
|
||||
data: {
|
||||
supplier: {{ company.id }},
|
||||
},
|
||||
follow: true,
|
||||
}
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
$("#company-order").click(function() {
|
||||
newOrder();
|
||||
});
|
||||
|
||||
$("#company-order-2").click(function() {
|
||||
newOrder();
|
||||
});
|
||||
|
||||
$("#po-table").bootstrapTable({
|
||||
search: true,
|
||||
sortable: true,
|
||||
});
|
||||
|
||||
{% endblock %}
|
@ -7,6 +7,8 @@
|
||||
|
||||
<h4>Supplier Stock</h4>
|
||||
|
||||
<hr>
|
||||
|
||||
{% include "stock_table.html" %}
|
||||
|
||||
{% 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>
|
||||
<th data-field='company'>Company</th>
|
||||
<th data-field='reference'>Order Reference</th>
|
||||
<th data-field='description'>Description</th>
|
||||
<th data-field='company' data-searchable='true'>Company</th>
|
||||
<th data-field='reference' data-searchable='true'>Order Reference</th>
|
||||
<th data-field='description' data-searchable='true'>Description</th>
|
||||
<th data-field='status'>Status</th>
|
||||
<th data-field='items'>Items</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for order in orders %}
|
||||
<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>
|
||||
@ -15,4 +18,5 @@
|
||||
<td>{{ order.lines.count }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
@ -158,6 +158,10 @@
|
||||
.navigation {
|
||||
}
|
||||
|
||||
.nav-tabs {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.breadcrump {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user