Smaller fixes and is_staff check
This commit is contained in:
parent
9fd744e186
commit
652ba705c5
4 changed files with 26 additions and 18 deletions
|
@ -1,19 +1,21 @@
|
|||
{% extends "base.html" %}
|
||||
{% load static %}
|
||||
|
||||
{% block title %}{{ area.container.display_name }} - {{ area.name }}{% endblock %}
|
||||
{% block title %}{{ area.name }}{% endblock %}
|
||||
|
||||
{% block header_bar %}
|
||||
<a href="{{ area.container_url }}"><img class="icon" src="{% static "inventory/img/back.svg" %}"></a>
|
||||
{{ area.container.display_name }} - {{ area.name }}
|
||||
{{ area.name }}
|
||||
<span class="small">{{ area.description}}</span>
|
||||
{% endblock %}
|
||||
|
||||
{% block header_icons %}
|
||||
{% if user.is_staff %}
|
||||
<li>
|
||||
<a href="{% url "admin:inventory_area_change" object_id=area.pk %}"><img class="icon" src="{% static "inventory/img/edit.svg" %}"></a>
|
||||
</li>
|
||||
{% include 'inventory/set_index.html' with item=area is_index=is_index %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
|
|
@ -14,8 +14,10 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block header_icons %}
|
||||
{% if user.is_staff %}
|
||||
<li>
|
||||
<a href="{% url "admin:inventory_box_change" object_id=object.pk %}"><img class="icon" src="{% static "inventory/img/edit.svg" %}"></a>
|
||||
</li>
|
||||
{% include 'inventory/set_index.html' with item=object is_index=is_index %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -7,13 +7,15 @@
|
|||
{% block header_bar %}
|
||||
<a href="{{ item.container_url }}"><img class="icon" src="{% static "inventory/img/back.svg" %}"></a>
|
||||
{{ item.name }}
|
||||
<span class="small">{{ item.description }} {{ item.form_factor }}</span></h2>
|
||||
<span class="small">{{ item.description }}{% if item.form_factor %}, {{ item.form_factor }}{% endif %}</span></h2>
|
||||
{% endblock %}
|
||||
|
||||
{% block header_icons %}
|
||||
{% if user.is_staff %}
|
||||
<li>
|
||||
<a href="{% url "admin:inventory_item_change" object_id=item.pk %}"><img class="icon" src="{% static "inventory/img/edit.svg" %}"></a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
|
|
@ -10,10 +10,12 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block header_icons %}
|
||||
{% if user.is_staff %}
|
||||
<li>
|
||||
<a href="{% url "admin:inventory_workshop_change" object_id=workshop.pk %}"><img class="icon" src="{% static "inventory/img/edit.svg" %}"></a>
|
||||
</li>
|
||||
{% include 'inventory/set_index.html' with item=workshop is_index=is_index %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
|
Loading…
Reference in a new issue