2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-20 22:06:28 +00:00

Add direct admin links if the user is staff

This commit is contained in:
Oliver Walters
2020-09-30 00:02:10 +10:00
parent 0e5f10c020
commit d1cce7df94
6 changed files with 32 additions and 6 deletions

View File

@ -7,7 +7,12 @@
<div class='row'>
<div class='col-sm-6'>
{% if category %}
<h3>{{ category.name }}</h3>
<h3>
{{ category.name }}
{% if user.is_staff %}
<a href="{% url 'admin:part_partcategory_change' category.pk %}"><span title="{% trans 'Admin view' %}" class='fas fa-user-shield'></span></a>
{% endif %}
</h3>
<p>{{ category.description }}</p>
{% else %}
<h3>{% trans "Part Categories" %}</h3>

View File

@ -28,6 +28,9 @@
<div class="media-body">
<h3>
{{ part.full_name }}
{% if user.is_staff %}
<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 %}
<div class='label label-large label-large-red'>
{% trans 'Inactive' %}