]> git.0d.be Git - django-panik-matos.git/blob - matos/templates/matos/piece_detail.html
b8b57eb95191edeee98a670c140ea044453b595e
[django-panik-matos.git] / matos / templates / matos / piece_detail.html
1 {% extends "matos/base.html" %}
2 {% load i18n %}
3
4 {% block appbar %}
5 <h2>{{ object.title }}</h2>
6 <span><a href="{% url 'pieces-list' %}">{% trans 'Back to inventory' %}</a></span>
7 {% endblock %}
8
9 {% block content %}
10
11 <p>
12 {% if perms.matos.change_piece %}
13 <a class="big-friendly-button" href="{% url 'piece-update' pk=piece.id %}">{% trans 'Edit Details' %}</a>
14 {% endif %}
15 {% if perms.matos.delete_piece %}
16 <a class="big-friendly-button actually-not-that-friendly"
17         href="{% url 'piece-delete' pk=piece.id %}">{% trans 'Delete' %}</a>
18 {% endif %}
19 </p>
20
21
22 <div id="piece-details">
23
24 {% if object.image %}
25 <img src="{{ object.image.url }}"/>
26 {% endif %}
27
28 <ul>
29 {% if object.reference %}
30 <li>{% trans 'Reference' %}: {{ object.reference }}</li>
31 {% endif %}
32 {% if object.purchase_date %}
33 <li>{% trans 'Purchase Date' %}: {{ object.purchase_date }}</li>
34 {% endif %}
35 {% if object.purchase_price %}
36 <li>{% trans 'Purchase Price' %}: {{ object.purchase_price }} €</li>
37 {% endif %}
38 </ul>
39 </div>
40
41 {% if object.comment %}
42 <h3>{% trans 'Comment' %}</h3>
43 <p>
44 {{ object.comment }}
45 </p>
46 {% endif %}
47
48 {% if object.location %}
49 <h3>{% trans 'Location' %}</h3>
50 <p>
51 {{ object.location }}
52 </p>
53 {% endif %}
54
55 {% endblock %}