mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Hide buttons for users without required permissions (#3219)
This commit is contained in:
parent
12fcccb5a6
commit
36868ebb4c
@ -172,7 +172,7 @@
|
||||
<h4>{% trans "Allocate Stock to Build" %}</h4>
|
||||
{% include "spacer.html" %}
|
||||
<div class='btn-group' role='group'>
|
||||
{% if build.active and build.has_untracked_bom_items %}
|
||||
{% if roles.build.add and build.active and build.has_untracked_bom_items %}
|
||||
<button class='btn btn-danger' type='button' id='btn-unallocate' title='{% trans "Unallocate stock" %}'>
|
||||
<span class='fas fa-minus-circle'></span> {% trans "Unallocate Stock" %}
|
||||
</button>
|
||||
@ -229,7 +229,7 @@
|
||||
<h4>{% trans "Incomplete Build Outputs" %}</h4>
|
||||
{% include "spacer.html" %}
|
||||
<div class='btn-group' role='group'>
|
||||
{% if build.active %}
|
||||
{% if roles.build.add and build.active %}
|
||||
<button class='btn btn-success' type='button' id='btn-create-output' title='{% trans "Create new build output" %}'>
|
||||
<span class='fas fa-plus-circle'></span> {% trans "New Build Output" %}
|
||||
</button>
|
||||
@ -249,12 +249,16 @@
|
||||
<span class='fas fa-tools'></span> <span class='caret'></span>
|
||||
</button>
|
||||
<ul class='dropdown-menu'>
|
||||
{% if roles.build.add %}
|
||||
<li><a class='dropdown-item' href='#' id='multi-output-complete' title='{% trans "Complete selected build outputs" %}'>
|
||||
<span class='fas fa-check-circle icon-green'></span> {% trans "Complete outputs" %}
|
||||
</a></li>
|
||||
{% endif %}
|
||||
{% if roles.build.delete %}
|
||||
<li><a class='dropdown-item' href='#' id='multi-output-delete' title='{% trans "Delete selected build outputs" %}'>
|
||||
<span class='fas fa-trash-alt icon-red'></span> {% trans "Delete outputs" %}
|
||||
</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
@ -20,9 +20,11 @@
|
||||
<h4>{% trans "Part Stock" %}</h4>
|
||||
{% include "spacer.html" %}
|
||||
<div class='btn-group' role='group'>
|
||||
{% if roles.stock.add %}
|
||||
<button type='button' class='btn btn-success' id='new-stock-item' title='{% trans "Create new stock item" %}'>
|
||||
<span class='fas fa-plus-circle'></span> {% trans "New Stock Item" %}
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -147,9 +147,11 @@
|
||||
<h4>{% trans "Installed Stock Items" %}</h4>
|
||||
{% include "spacer.html" %}
|
||||
<div class='btn-group' role='group'>
|
||||
{% if roles.stock.add %}
|
||||
<button type='button' class='btn btn-success' id='stock-item-install'>
|
||||
<span class='fas fa-plus-circle'></span> {% trans "Install Stock Item" %}
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user