mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Create template for stock table
This commit is contained in:
parent
b8f5c8cca7
commit
0a1887477c
@ -7,19 +7,20 @@
|
||||
|
||||
<h3>Supplier Stock</h3>
|
||||
|
||||
<table class='table table-striped table-condensed' id='stock-table'>
|
||||
</table>
|
||||
{% include "stock_table.html" %}
|
||||
|
||||
{% endblock %}
|
||||
{% block js_ready %}
|
||||
{{ block.super }}
|
||||
|
||||
loadStockTable($('#stock-table'),
|
||||
{
|
||||
url: "{% url 'api-stock-list' %}",
|
||||
params: {
|
||||
supplier: {{ company.id }},
|
||||
}
|
||||
loadStockTable($('#stock-table'), {
|
||||
url: "{% url 'api-stock-list' %}",
|
||||
params: {
|
||||
supplier: {{ company.id }},
|
||||
},
|
||||
buttons: [
|
||||
'#stock-options',
|
||||
]
|
||||
});
|
||||
|
||||
{% endblock %}
|
@ -13,25 +13,7 @@
|
||||
</div>
|
||||
<hr>
|
||||
|
||||
<div id='button-toolbar'>
|
||||
{% if part.active %}
|
||||
<button class='btn btn-success' id='add-stock-item'>New Stock Item</button>
|
||||
{% endif %}
|
||||
<div id='opt-dropdown' class="dropdown" style='float: right;'>
|
||||
<button id='stock-options' class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Options
|
||||
<span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href='#' id='multi-item-take' title='Take items from stock'>Take items</a></li>
|
||||
<li><a href='#' id='multi-item-give' title='Give items to stock'>Add items</a></li>
|
||||
<li><a href="#" id='multi-item-stocktake' title='Stocktake selected stock items'>Stocktake</a></li>
|
||||
<li><a href='#' id='multi-item-move' title='Move selected stock items'>Move items</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class='table table-striped table-condensed' data-toolbar='#button-toolbar' id='stock-table'>
|
||||
</table>
|
||||
|
||||
{% include "stock_table.html" %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@ -87,14 +69,14 @@
|
||||
return false;
|
||||
});
|
||||
|
||||
$("#multi-item-take").click(function() {
|
||||
$("#multi-item-remove").click(function() {
|
||||
updateStockItems({
|
||||
action: 'remove',
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
$("#multi-item-give").click(function() {
|
||||
$("#multi-item-add").click(function() {
|
||||
updateStockItems({
|
||||
action: 'add',
|
||||
});
|
||||
|
@ -44,24 +44,7 @@
|
||||
|
||||
<hr>
|
||||
|
||||
<div id='button-toolbar'>
|
||||
<div class='button-toolbar container-fluid' style='float: right;'>
|
||||
<button class="btn btn-success" id='item-create'>New Stock Item</button>
|
||||
<div class="dropdown" style='float: right;'>
|
||||
<button id='stock-options' class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Options<span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#" id='multi-item-add' title='Add to selected stock items'>Add stock</a></li>
|
||||
<li><a href="#" id='multi-item-remove' title='Remove from selected stock items'>Remove stock</a></li>
|
||||
<li><a href="#" id='multi-item-stocktake' title='Stocktake selected stock items'>Stocktake</a></li>
|
||||
<li><a href='#' id='multi-item-move' title='Move selected stock items'>Move</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class='table table-striped table-condensed' data-toolbar='#button-toolbar' id='stock-table'>
|
||||
</table>
|
||||
|
||||
{% include "stock_table.html" %}
|
||||
|
||||
{% include 'modals.html' %}
|
||||
|
||||
|
17
InvenTree/templates/stock_table.html
Normal file
17
InvenTree/templates/stock_table.html
Normal file
@ -0,0 +1,17 @@
|
||||
<div id='button-toolbar'>
|
||||
<div class='button-toolbar container-fluid' style='float: right;'>
|
||||
<button class="btn btn-success" id='item-create'>New Stock Item</button>
|
||||
<div class="dropdown" style='float: right;'>
|
||||
<button id='stock-options' class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Options<span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="#" id='multi-item-add' title='Add to selected stock items'>Add stock</a></li>
|
||||
<li><a href="#" id='multi-item-remove' title='Remove from selected stock items'>Remove stock</a></li>
|
||||
<li><a href="#" id='multi-item-stocktake' title='Stocktake selected stock items'>Stocktake</a></li>
|
||||
<li><a href='#' id='multi-item-move' title='Move selected stock items'>Move</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class='table table-striped table-condensed' data-toolbar='#button-toolbar' id='stock-table'>
|
||||
</table>
|
Loading…
Reference in New Issue
Block a user