diff --git a/inventory/models/item.py b/inventory/models/item.py index 22dc74b..f96f574 100644 --- a/inventory/models/item.py +++ b/inventory/models/item.py @@ -28,4 +28,4 @@ class Item(CanBeContained): @property def all_tags(self): - return self.tags.all() + self.form_factor.tags.all() + return list(self.tags.all()) + list(self.form_factor.tags.all()) diff --git a/inventory/templates/inventory/item_detail.html b/inventory/templates/inventory/item_detail.html index 2e733c3..6489b4a 100644 --- a/inventory/templates/inventory/item_detail.html +++ b/inventory/templates/inventory/item_detail.html @@ -22,9 +22,42 @@ - - + + + + + + + + + + + + {% if item.form_factor %} + + + + + {% endif %} {% if item.manufacturer %} @@ -48,23 +81,6 @@ {% endif %} - {% if item.form_factor %} - - - - - {% endif %} - {% if item.price %}
Description{{ item }}Name{{ item.name }}
Description{{ item.description }}
Tags +
    + {% for tag in item.all_tags %} +
  • {{ tag.name }}
  • + {% empty %} + No tags + {% endfor %} +
+
Form factor + {% if item.form_factor.datasheet %} + + {% if item.form_factor.icon %}{% endif %} + {{ item.form_factor.name }} + + {% else %} + {% if item.form_factor.icon %}{% endif %} + {{ item.form_factor.name }} + {% endif %} +
Form factor - {% if item.form_factor.datasheet %} - - {% if item.form_factor.icon %}{% endif %} - {{ item.form_factor.name }} - - {% else %} - {% if item.form_factor.icon %}{% endif %} - {{ item.form_factor.name }} - {% endif %} -
Price