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 -->
|
||||
{% 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 class='btn-group'>
|
||||
<button class='btn btn-success' type='button' title='New tracking entry' id='new-entry'>
|
||||
@ -22,6 +23,7 @@
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<table class='table table-condensed table-striped' id='track-table' data-toolbar='#table-toolbar'>
|
||||
</table>
|
||||
|
||||
|
@ -114,8 +114,8 @@ InvenTree | {% trans "Stock Item" %} - {{ item }}
|
||||
<!-- Stock adjustment menu -->
|
||||
<!-- Check permissions and owner -->
|
||||
{% 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 not item.is_building %}
|
||||
{% if owner_enable.value == "False" or owner_enable.value == "True" and item.owner == user %}
|
||||
{% if roles.stock.change and not item.is_building %}
|
||||
<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>
|
||||
<ul class='dropdown-menu' role='menu'>
|
||||
@ -164,7 +164,6 @@ InvenTree | {% trans "Stock Item" %} - {{ item }}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
<!-- Check permissions and owner -->
|
||||
{% endif %}
|
||||
<button type='button' class='btn btn-default' id='stock-test-report' title='{% trans "Generate test report" %}'>
|
||||
<span class='fas fa-file-invoice'/>
|
||||
|
Loading…
Reference in New Issue
Block a user