2017-02-16 01:01:36 +00:00
{% extends "base.html" %}
{% block content %}
< ol class = "breadcrumb" >
< li > < a href = "/item/" > Everything< / a > < / li >
{% for ancestor in ancestors %}
< li > < a href = "{{ ancestor.get_absolute_url }}" > {{ ancestor.name }}< / a > < / li >
{% endfor %}
< li class = "active" > {{ item.name }}< / li >
< / ol >
2017-02-28 23:16:10 +00:00
< h2 >
< small class = "pull-right" > < a href = "{% url 'admin:storage_item_change' item.pk %}" > < span class = "glyphicon glyphicon-pencil" > < / span > < / a > < / small >
2017-10-24 18:59:08 +00:00
{% include "widgets/categoryicon.html" with category=item.primary_category %}
2017-02-28 23:16:10 +00:00
{{ item.name }} < small > {{ item.pk }}< / small >
< / h2 >
2017-02-16 01:01:36 +00:00
< div class = "row" >
< div class = "col-md-4" >
2017-10-07 19:32:29 +00:00
< h3 > Details< / h3 >
< table class = "table table-hover table-striped" >
{% if item.owner %}
< tr > < td > owner< / td > < td > {{ item.owner }}< / td > < / tr >
{% endif %}
< tr > < td > state< / td > < td > {{ item.state }}< / td > < / tr >
{% if item.taken_by %}
< tr > < td > taken by< / td > < td > {{ item.taken_by }}< / td > < / tr >
{% endif %}
{% if item.taken_on %}
< tr > < td > taken on< / td > < td > {{ item.taken_on }}< / td > < / tr >
{% endif %}
{% if item.taken_until %}
< tr > < td > taken until< / td > < td > {{ item.taken_until }}< / td > < / tr >
{% endif %}
< / table >
2017-02-28 23:16:10 +00:00
< h3 > Properties< / h3 >
2017-02-16 01:01:36 +00:00
< table class = "table table-hover table-striped" >
< thead >
< tr >
< th > key< / th >
< th > value< / th >
< / tr >
< / thead >
{% for k, v in item.props.items %}
2017-02-28 23:16:10 +00:00
< tr > < td > {{ k }}< / td > < td > {{ v|urlize }}< / td > < / tr >
{% empty %}
2017-10-08 20:39:47 +00:00
< tr > < td colspan = 2 class = "placeholder" > No properties< / td > < / tr >
2017-02-16 01:01:36 +00:00
{% endfor %}
< / table >
2017-02-28 23:16:10 +00:00
2017-10-24 18:59:08 +00:00
{% if categories %}
< h3 > Categories< / h3 >
< table class = "table table-hover table-striped" >
{% for category in categories %}
< tr >
< td style = "padding: 0px 8px; width: 2rem;" >
{% include "widgets/categoryicon.html" with category=category %}
< / td >
< td >
{{ category.name }}
< / td >
< / tr >
{% endfor %}
< / table >
{% endif %}
2017-02-28 23:16:10 +00:00
{% if images %}
< h3 > Photos< / h3 >
< div class = "row" >
{% for image in images %}
< div class = "col-md-6" >
< a href = "{{ image.image.url }}" >
< img src = "{{ image.image.url }}" class = "img-responsive img-thumbnail" / >
< / a >
< / div >
{% endfor %}
< / div >
2017-02-16 01:01:36 +00:00
{% endif %}
2017-04-28 12:14:27 +00:00
{% if labels %}
< h3 > Labels< / h3 >
2017-10-24 16:59:36 +00:00
< iframe name = "printframe" style = "display: none" > < / iframe >
2017-04-28 12:14:27 +00:00
{% for label in labels %}
2017-10-24 16:59:36 +00:00
< form action = "http://label.waw.hackerspace.pl:4567/api/1/print/{{ label.id }}" method = "POST" target = "printframe" onsubmit = "return confirm('Want to print this label?')" >
< button class = "btn btn-xs btn-default" title = "Print" > {{label.id}}< / button >
2017-10-22 21:43:21 +00:00
< / form >
2017-04-28 12:14:27 +00:00
{% endfor %}
{% endif %}
2017-02-16 01:01:36 +00:00
< / div >
2017-02-28 23:16:10 +00:00
< div class = "col-md-8" >
2017-10-07 20:29:28 +00:00
{% if item.description %}
{% load md2 %}
{{ item.description|markdown:"code-color" }}
{% endif %}
2017-02-28 23:16:10 +00:00
< h3 > Children< / h3 >
2017-10-24 18:59:08 +00:00
{% include "widgets/itemlist.html" with list=children|dictsort:"name" item=item %}
2017-02-28 23:16:10 +00:00
< / div >
< / div >
2017-02-16 01:01:36 +00:00
{% endblock %}