mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-20 22:06:28 +00:00
More template changes: perms -> roles
This commit is contained in:
@ -28,7 +28,7 @@
|
||||
<div class="media-body">
|
||||
<h3>
|
||||
{{ part.full_name }}
|
||||
{% if user.is_staff and perms.part.change_part %}
|
||||
{% if user.is_staff and roles.part.change %}
|
||||
<a href="{% url 'admin:part_part_change' part.pk %}"><span title="{% trans 'Admin view' %}" class='fas fa-user-shield'></span></a>
|
||||
{% endif %}
|
||||
{% if not part.active %}
|
||||
@ -315,7 +315,7 @@
|
||||
});
|
||||
{% endif %}
|
||||
|
||||
{% if not part.active and perms.part.delete_part %}
|
||||
{% if not part.active and roles.part.delete %}
|
||||
$("#part-delete").click(function() {
|
||||
launchModalForm(
|
||||
"{% url 'part-delete' part.id %}",
|
||||
|
@ -36,7 +36,7 @@
|
||||
<li{% ifequal tab 'used' %} class="active"{% endifequal %}>
|
||||
<a href="{% url 'part-used-in' part.id %}">{% trans "Used In" %} {% if part.used_in_count > 0 %}<span class="badge">{{ part.used_in_count }}</span>{% endif %}</a></li>
|
||||
{% endif %}
|
||||
{% if part.purchaseable and perms.order.view_purchaseorder %}
|
||||
{% if part.purchaseable and roles.purchase_order.view %}
|
||||
{% if part.is_template == False %}
|
||||
<li{% ifequal tab 'suppliers' %} class="active"{% endifequal %}>
|
||||
<a href="{% url 'part-suppliers' part.id %}">{% trans "Suppliers" %}
|
||||
@ -48,7 +48,7 @@
|
||||
<a href="{% url 'part-orders' part.id %}">{% trans "Purchase Orders" %} <span class='badge'>{{ part.purchase_orders|length }}</span></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if part.salable and perms.order.view_salesorder %}
|
||||
{% if part.salable and roles.sales_order.view %}
|
||||
<li {% if tab == 'sales-prices' %}class='active'{% endif %}>
|
||||
<a href="{% url 'part-sale-prices' part.id %}">{% trans "Sale Price" %}</a>
|
||||
</li>
|
||||
|
Reference in New Issue
Block a user