mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Update template permissions
This commit is contained in:
parent
1c97aaf87a
commit
9abb211cdf
@ -32,29 +32,31 @@ src="{% static 'img/blank_image.png' %}"
|
|||||||
<p>
|
<p>
|
||||||
<div class='btn-row'>
|
<div class='btn-row'>
|
||||||
<div class='btn-group action-buttons'>
|
<div class='btn-group action-buttons'>
|
||||||
<button type='button' class='btn btn-default' id='edit-order' title='Edit order information'>
|
{% if roles.purchase_order.change %}
|
||||||
|
<button type='button' class='btn btn-default' id='edit-order' title='{% trans "Edit order information" %}'>
|
||||||
<span class='fas fa-edit icon-green'></span>
|
<span class='fas fa-edit icon-green'></span>
|
||||||
</button>
|
</button>
|
||||||
<button type='button' class='btn btn-default' id='export-order' title='Export order to file'>
|
|
||||||
<span class='fas fa-file-download'></span>
|
|
||||||
</button>
|
|
||||||
{% if order.status == PurchaseOrderStatus.PENDING and order.lines.count > 0 %}
|
{% if order.status == PurchaseOrderStatus.PENDING and order.lines.count > 0 %}
|
||||||
<button type='button' class='btn btn-default' id='place-order' title='Place order'>
|
<button type='button' class='btn btn-default' id='place-order' title='{% trans "Place order" %}'>
|
||||||
<span class='fas fa-paper-plane icon-blue'></span>
|
<span class='fas fa-paper-plane icon-blue'></span>
|
||||||
</button>
|
</button>
|
||||||
{% elif order.status == PurchaseOrderStatus.PLACED %}
|
{% elif order.status == PurchaseOrderStatus.PLACED %}
|
||||||
<button type='button' class='btn btn-default' id='receive-order' title='Receive items'>
|
<button type='button' class='btn btn-default' id='receive-order' title='{% trans "Receive items" %}'>
|
||||||
<span class='fas fa-clipboard-check'></span>
|
<span class='fas fa-clipboard-check'></span>
|
||||||
</button>
|
</button>
|
||||||
<button type='button' class='btn btn-default' id='complete-order' title='Mark order as complete'>
|
<button type='button' class='btn btn-default' id='complete-order' title='{% trans "Mark order as complete" %}'>
|
||||||
<span class='fas fa-check-circle'></span>
|
<span class='fas fa-check-circle'></span>
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if order.status == PurchaseOrderStatus.PENDING or order.status == PurchaseOrderStatus.PLACED %}
|
{% if order.status == PurchaseOrderStatus.PENDING or order.status == PurchaseOrderStatus.PLACED %}
|
||||||
<button type='button' class='btn btn-default' id='cancel-order' title='Cancel order'>
|
<button type='button' class='btn btn-default' id='cancel-order' title='{% trans "Cancel order" %}'>
|
||||||
<span class='fas fa-times-circle icon-red'></span>
|
<span class='fas fa-times-circle icon-red'></span>
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
<button type='button' class='btn btn-default' id='export-order' title='{% trans "Export order to file" %}'>
|
||||||
|
<span class='fas fa-file-download'></span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</p>
|
</p>
|
||||||
|
@ -28,9 +28,11 @@
|
|||||||
<div class='col-sm-6'>
|
<div class='col-sm-6'>
|
||||||
<h4>{% trans "Order Notes" %}</h4>
|
<h4>{% trans "Order Notes" %}</h4>
|
||||||
</div>
|
</div>
|
||||||
|
{% if roles.purchase_order.change %}
|
||||||
<div class='col-sm-6'>
|
<div class='col-sm-6'>
|
||||||
<button title='{% trans "Edit notes" %}' class='btn btn-default action-button float-right' id='edit-notes'><span class='fas fa-edit'></span></button>
|
<button title='{% trans "Edit notes" %}' class='btn btn-default action-button float-right' id='edit-notes'><span class='fas fa-edit'></span></button>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
<div class='panel panel-default'>
|
<div class='panel panel-default'>
|
||||||
|
@ -14,7 +14,6 @@
|
|||||||
|
|
||||||
{% include "attachment_table.html" with attachments=order.attachments.all %}
|
{% include "attachment_table.html" with attachments=order.attachments.all %}
|
||||||
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block js_ready %}
|
{% block js_ready %}
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
<div id='order-toolbar-buttons' class='btn-group' style='float: right;'>
|
<div id='order-toolbar-buttons' class='btn-group' style='float: right;'>
|
||||||
{% if order.status == PurchaseOrderStatus.PENDING %}
|
{% if order.status == PurchaseOrderStatus.PENDING and roles.purchase_order.change %}
|
||||||
<button type='button' class='btn btn-default' id='new-po-line'>{% trans "Add Line Item" %}</button>
|
<button type='button' class='btn btn-default' id='new-po-line'>{% trans "Add Line Item" %}</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
@ -209,12 +209,12 @@ $("#po-table").inventreeTable({
|
|||||||
|
|
||||||
var pk = row.pk;
|
var pk = row.pk;
|
||||||
|
|
||||||
{% if order.status == PurchaseOrderStatus.PENDING %}
|
{% if order.status == PurchaseOrderStatus.PENDING and roles.purchase_order.delete %}
|
||||||
html += makeIconButton('fa-edit icon-blue', 'button-line-edit', pk, '{% trans "Edit line item" %}');
|
html += makeIconButton('fa-edit icon-blue', 'button-line-edit', pk, '{% trans "Edit line item" %}');
|
||||||
html += makeIconButton('fa-trash-alt icon-red', 'button-line-delete', pk, '{% trans "Delete line item" %}');
|
html += makeIconButton('fa-trash-alt icon-red', 'button-line-delete', pk, '{% trans "Delete line item" %}');
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if order.status == PurchaseOrderStatus.PLACED %}
|
{% if order.status == PurchaseOrderStatus.PLACED and roles.purchase_order.change %}
|
||||||
if (row.received < row.quantity) {
|
if (row.received < row.quantity) {
|
||||||
html += makeIconButton('fa-clipboard-check', 'button-line-receive', pk, '{% trans "Receive line item" %}');
|
html += makeIconButton('fa-clipboard-check', 'button-line-receive', pk, '{% trans "Receive line item" %}');
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,9 @@ InvenTree | {% trans "Purchase Orders" %}
|
|||||||
|
|
||||||
<div id='table-buttons'>
|
<div id='table-buttons'>
|
||||||
<div class='button-toolbar container-fluid' style='float: right;'>
|
<div class='button-toolbar container-fluid' style='float: right;'>
|
||||||
|
{% if roles.purchase_order.add %}
|
||||||
<button class='btn btn-primary' type='button' id='po-create' title='{% trans "Create new purchase order" %}'>{% trans "New Purchase Order" %}</button>
|
<button class='btn btn-primary' type='button' id='po-create' title='{% trans "Create new purchase order" %}'>{% trans "New Purchase Order" %}</button>
|
||||||
|
{% endif %}
|
||||||
<div class='filter-list' id='filter-list-purchaseorder'>
|
<div class='filter-list' id='filter-list-purchaseorder'>
|
||||||
<!-- An empty div in which the filter list will be constructed -->
|
<!-- An empty div in which the filter list will be constructed -->
|
||||||
</div>
|
</div>
|
||||||
|
@ -41,12 +41,10 @@ src="{% static 'img/blank_image.png' %}"
|
|||||||
<p>{{ order.description }}</p>
|
<p>{{ order.description }}</p>
|
||||||
<div class='btn-row'>
|
<div class='btn-row'>
|
||||||
<div class='btn-group action-buttons'>
|
<div class='btn-group action-buttons'>
|
||||||
|
{% if roles.sales_order.change %}
|
||||||
<button type='button' class='btn btn-default' id='edit-order' title='Edit order information'>
|
<button type='button' class='btn btn-default' id='edit-order' title='Edit order information'>
|
||||||
<span class='fas fa-edit icon-green'></span>
|
<span class='fas fa-edit icon-green'></span>
|
||||||
</button>
|
</button>
|
||||||
<button type='button' disabled='' class='btn btn-default' id='packing-list' title='{% trans "Packing List" %}'>
|
|
||||||
<span class='fas fa-clipboard-list'></span>
|
|
||||||
</button>
|
|
||||||
{% if order.status == SalesOrderStatus.PENDING %}
|
{% if order.status == SalesOrderStatus.PENDING %}
|
||||||
<button type='button' class='btn btn-default' id='ship-order' title='{% trans "Ship order" %}'>
|
<button type='button' class='btn btn-default' id='ship-order' title='{% trans "Ship order" %}'>
|
||||||
<span class='fas fa-paper-plane icon-blue'></span>
|
<span class='fas fa-paper-plane icon-blue'></span>
|
||||||
@ -55,6 +53,10 @@ src="{% static 'img/blank_image.png' %}"
|
|||||||
<span class='fas fa-times-circle icon-red'></span>
|
<span class='fas fa-times-circle icon-red'></span>
|
||||||
</button>
|
</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
<button type='button' disabled='' class='btn btn-default' id='packing-list' title='{% trans "Packing List" %}'>
|
||||||
|
<span class='fas fa-clipboard-list'></span>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -14,7 +14,9 @@ InvenTree | {% trans "Sales Orders" %}
|
|||||||
|
|
||||||
<div id='table-buttons'>
|
<div id='table-buttons'>
|
||||||
<div class='button-toolbar container-fluid' style='float: right;'>
|
<div class='button-toolbar container-fluid' style='float: right;'>
|
||||||
|
{% if roles.sales_order.add %}
|
||||||
<button class='btn btn-primary' type='button' id='so-create' title='{% trans "Create new sales order" %}'>{% trans "New Sales Order" %}</button>
|
<button class='btn btn-primary' type='button' id='so-create' title='{% trans "Create new sales order" %}'>{% trans "New Sales Order" %}</button>
|
||||||
|
{% endif %}
|
||||||
<div class='filter-list' id='filter-list-salesorder'>
|
<div class='filter-list' id='filter-list-salesorder'>
|
||||||
<!-- An empty div in which the filter list will be constructed -->
|
<!-- An empty div in which the filter list will be constructed -->
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user