mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-30 18:50:53 +00:00
Add direct admin links if the user is staff
This commit is contained in:
@ -61,9 +61,12 @@ InvenTree | {% trans "Stock Item" %} - {{ item }}
|
||||
<hr>
|
||||
<h4>
|
||||
{% if item.serialized %}
|
||||
<a href='{% url "part-detail" item.part.pk %}'>{{ item.part.full_name}}</a> # {{ item.serial }}
|
||||
<a href='{% url "part-detail" item.part.pk %}'>{{ item.part.full_name}}</a> # {{ item.serial }}
|
||||
{% else %}
|
||||
<a href='{% url "part-detail" item.part.pk %}'>{{ item.part.full_name }}</a> × {% decimal item.quantity %}
|
||||
<a href='{% url "part-detail" item.part.pk %}'>{{ item.part.full_name }}</a> × {% decimal item.quantity %}
|
||||
{% endif %}
|
||||
{% if user.is_staff %}
|
||||
<a href="{% url 'admin:stock_stockitem_change' item.pk %}"><span title="{% trans 'Admin view' %}" class='fas fa-user-shield'></span></a>
|
||||
{% endif %}
|
||||
</h4>
|
||||
|
||||
|
@ -6,7 +6,12 @@
|
||||
<div class='row'>
|
||||
<div class='col-sm-6'>
|
||||
{% if location %}
|
||||
<h3>{{ location.name }}</h3>
|
||||
<h3>
|
||||
{{ location.name }}
|
||||
{% if user.is_staff %}
|
||||
<a href="{% url 'admin:stock_stocklocation_change' location.pk %}"><span title="{% trans 'Admin view' %}" class='fas fa-user-shield'></span></a>
|
||||
{% endif %}
|
||||
</h3>
|
||||
<p>{{ location.description }}</p>
|
||||
{% else %}
|
||||
<h3>{% trans "Stock" %}</h3>
|
||||
|
Reference in New Issue
Block a user