use new setting for part-actions

PR complete for #1999
This commit is contained in:
Matthias 2021-08-22 23:36:49 +02:00
parent b674d851f2
commit 9fd4b5cce3
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -10,6 +10,11 @@
{% block content %}
{% settings_value 'BUY_FUNCTION_ENABLE' as enable_buy %}
{% settings_value 'SELL_FUNCTION_ENABLE' as enable_sell %}
{% settings_value 'PO_FUNCTION_ENABLE' as enable_po %}
{% settings_value 'STOCK_FUNCTION_ENABLE' as enable_stock %}
<div class="panel panel-default panel-inventree">
<!-- Default panel contents -->
<div class="panel-heading"><h3>{{ part.full_name }}</h3></div>
@ -80,10 +85,12 @@
</div>
{% endif %}
{% if part.active %}
{% if enable_buy or enable_sell %}
<button type='button' class='btn btn-default' id='price-button' title='{% trans "Show pricing information" %}'>
<span id='part-price-icon' class='fas fa-dollar-sign'/>
</button>
{% if roles.stock.change %}
{% endif %}
{% if roles.stock.change and enable_stock %}
<div class='btn-group'>
<button id='stock-actions' title='{% trans "Stock actions" %}' class='btn btn-default dropdown-toggle' type='button' data-toggle='dropdown'>
<span class='fas fa-boxes'></span> <span class='caret'></span>
@ -104,8 +111,8 @@
</ul>
</div>
{% endif %}
{% if part.purchaseable %}
{% if roles.purchase_order.add %}
{% if part.purchaseable and roles.purchase_order.add %}
{% if enable_buy and enable_po %}
<button type='button' class='btn btn-default' id='part-order' title='{% trans "Order part" %}'>
<span id='part-order-icon' class='fas fa-shopping-cart'/>
</button>