diff --git a/inventory/templates/inventory/box-ikea-samla.html b/inventory/templates/inventory/box-ikea-samla.html index e69de29..abed5d0 100644 --- a/inventory/templates/inventory/box-ikea-samla.html +++ b/inventory/templates/inventory/box-ikea-samla.html @@ -0,0 +1,29 @@ +{% extends "base.html" %} +{% load static %} +{% load admin_urls %} + +{% block head %} + +{% endblock %} + +{% block title %}{{ object.name }}{% endblock %} + +{% block content %} +

{{ object.name }} {{ object.description}}

+ + + + + + + {% endfor %} + +
+
+ {% for compartment in layouted.0 %} + {% include "inventory/cell.html" with item=compartment %} + {% endfor %} +
+
+ +{% endblock %} diff --git a/inventory/templates/inventory/box-raaco-even.html b/inventory/templates/inventory/box-raaco-even.html index e69de29..f49123a 100644 --- a/inventory/templates/inventory/box-raaco-even.html +++ b/inventory/templates/inventory/box-raaco-even.html @@ -0,0 +1,32 @@ +{% extends "base.html" %} +{% load static %} +{% load admin_urls %} + +{% block head %} + +{% endblock %} + +{% block title %}{{ object.name }}{% endblock %} + +{% block content %} +

{{ object.name }} {{ object.description}}

+ + + + {% for line in layouted %} + + {% for item in line %} + + {% endfor %} + + {% endfor %} + +
+
+ {% for compartment in item %} + {% include "inventory/cell.html" with item=compartment %} + {% endfor %} +
+
+ +{% endblock %} diff --git a/inventory/templates/inventory/box-raaco-simple.html b/inventory/templates/inventory/box-raaco-simple.html index e69de29..8ddc7ea 100644 --- a/inventory/templates/inventory/box-raaco-simple.html +++ b/inventory/templates/inventory/box-raaco-simple.html @@ -0,0 +1,30 @@ +{% extends "base.html" %} +{% load static %} +{% load admin_urls %} + +{% block head %} + +{% endblock %} + +{% block title %}{{ object.name }}{% endblock %} + +{% block content %} +

{{ object.name }} {{ object.description}}

+ + + + {% for item in layouted.0 %} + + + + {% endfor %} + +
+
+ {% for compartment in item %} + {% include "inventory/cell.html" with item=compartment %} + {% endfor %} +
+
+ +{% endblock %} diff --git a/inventory/templates/inventory/box-smd-box-all.html b/inventory/templates/inventory/box-smd-box-all.html index 83e54fb..54b6764 100644 --- a/inventory/templates/inventory/box-smd-box-all.html +++ b/inventory/templates/inventory/box-smd-box-all.html @@ -3,16 +3,16 @@ {% load admin_urls %} {% block head %} - + {% endblock %} -{% block title %}{{ context.title }}{% endblock %} +{% block title %}{{ object.name }}{% endblock %} {% block content %} -

{{ object.name }}

- +

{{ object.name }} {{ object.description}}

+ {% for part in layouted %} - +
@@ -25,33 +25,12 @@ {% for line in part %} - {% for column in line %} + {% for item in line %} {% endfor %} diff --git a/inventory/templates/inventory/cell.html b/inventory/templates/inventory/cell.html new file mode 100644 index 0000000..a51f45b --- /dev/null +++ b/inventory/templates/inventory/cell.html @@ -0,0 +1,34 @@ +{% load static %} +{% load admin_urls %} + +
+ {% if item.name %} + {% if item.metadata.package %} +
{{ item.metadata.package }}
+ {% endif %} + {% if item.documentation.all %} + + {{ item.name | linebreaksbr }} + + {% else %} + + {% endif %} +
+ + +
+ + {% if item.price %} +
{{ item.price | floatformat:2 }} €
+ {% endif %} + {% if item.distributor %} + + {% endif %} + {% else %} +
+
+
+ {% endif %} +
\ No newline at end of file
{{ forloop.counter }} -
- {% if column.name %} - {% if column.metadata.package %} -
{{ column.metadata.package }}
- {% endif %} - {% if column.documentation.all %} - - {{ column.name | linebreaksbr }} - - {% else %} - - {% endif %} - - - {% if column.price %} -
{{ column.price | floatformat:2 }} €
- {% endif %} - {% if column.distributor %} - - {% endif %} - {% else %} - - {% endif %} +
+ {% for compartment in item %} + {% include "inventory/cell.html" with item=compartment %} + {% endfor %}