mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Fixed template logic
This commit is contained in:
parent
2c38be2d13
commit
4104e7df8e
@ -13,7 +13,8 @@
|
|||||||
|
|
||||||
<!-- Check permissions and owner -->
|
<!-- Check permissions and owner -->
|
||||||
{% setting_object 'STOCK_OWNER' as owner_enable %}
|
{% setting_object 'STOCK_OWNER' as owner_enable %}
|
||||||
{% if user.is_superuser or roles.stock.change and item.owner == user and owner_enable.value == "True" %}
|
{% if owner_enable.value == "False" or owner_enable.value == "True" and item.owner == user %}
|
||||||
|
{% if roles.stock.change and not item.is_building %}
|
||||||
<div id='table-toolbar'>
|
<div id='table-toolbar'>
|
||||||
<div class='btn-group'>
|
<div class='btn-group'>
|
||||||
<button class='btn btn-success' type='button' title='New tracking entry' id='new-entry'>
|
<button class='btn btn-success' type='button' title='New tracking entry' id='new-entry'>
|
||||||
@ -22,6 +23,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
<table class='table table-condensed table-striped' id='track-table' data-toolbar='#table-toolbar'>
|
<table class='table table-condensed table-striped' id='track-table' data-toolbar='#table-toolbar'>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
@ -114,8 +114,8 @@ InvenTree | {% trans "Stock Item" %} - {{ item }}
|
|||||||
<!-- Stock adjustment menu -->
|
<!-- Stock adjustment menu -->
|
||||||
<!-- Check permissions and owner -->
|
<!-- Check permissions and owner -->
|
||||||
{% setting_object 'STOCK_OWNER' as owner_enable %}
|
{% setting_object 'STOCK_OWNER' as owner_enable %}
|
||||||
{% if user.is_superuser or roles.stock.change and item.owner == user and owner_enable.value == "True" %}
|
{% if owner_enable.value == "False" or owner_enable.value == "True" and item.owner == user %}
|
||||||
{% if not item.is_building %}
|
{% if roles.stock.change and not item.is_building %}
|
||||||
<div class='btn-group'>
|
<div class='btn-group'>
|
||||||
<button id='stock-options' title='{% trans "Stock adjustment actions" %}' class='btn btn-default dropdown-toggle' type='button' data-toggle='dropdown'><span class='fas fa-boxes'></span> <span class='caret'></span></button>
|
<button id='stock-options' title='{% trans "Stock adjustment actions" %}' class='btn btn-default dropdown-toggle' type='button' data-toggle='dropdown'><span class='fas fa-boxes'></span> <span class='caret'></span></button>
|
||||||
<ul class='dropdown-menu' role='menu'>
|
<ul class='dropdown-menu' role='menu'>
|
||||||
@ -164,7 +164,6 @@ InvenTree | {% trans "Stock Item" %} - {{ item }}
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<!-- Check permissions and owner -->
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<button type='button' class='btn btn-default' id='stock-test-report' title='{% trans "Generate test report" %}'>
|
<button type='button' class='btn btn-default' id='stock-test-report' title='{% trans "Generate test report" %}'>
|
||||||
<span class='fas fa-file-invoice'/>
|
<span class='fas fa-file-invoice'/>
|
||||||
|
Loading…
Reference in New Issue
Block a user