- {% if brickset_owners | length %}
- {{ accordion.header('Owners', 'owners', 'metadata', icon='user-line') }}
-
- {% for owner in brickset_owners %}
- {% with id=owner.as_dataset() %}
-
-
- {{ owner.fields.name }}
-
- {% endwith %}
- {% endfor %}
+ {% if not (brickset_owners | length) and not (brickset_purchase_locations | length) and not (brickset_storages | length) and not (brickset_tags | length) %}
+
+ You have no metadata configured.
+ You can add entries in the
Set metadata management section of the Admin panel.
- {{ accordion.footer() }}
- {% endif %}
- {% if brickset_purchase_locations | length %}
- {{ accordion.header('Purchase location', 'purchase-location', 'metadata', icon='building-line') }}
-
{{ name }}
-
-
- None
- {% for purchase_location in brickset_purchase_locations %}
- {{ purchase_location.fields.name }}
- {% endfor %}
-
-
- {{ accordion.footer() }}
- {% endif %}
- {% if brickset_storages | length %}
- {{ accordion.header('Storage', 'storage', 'metadata', icon='archive-2-line') }}
-
{{ name }}
-
-
- None
- {% for storage in brickset_storages %}
- {{ storage.fields.name }}
- {% endfor %}
-
-
- {{ accordion.footer() }}
- {% endif %}
- {% if brickset_tags | length %}
- {{ accordion.header('Tags', 'tags', 'metadata', icon='price-tag-2-line') }}
-
- {{ accordion.footer() }}
+ {% else %}
+ {% if brickset_owners | length %}
+ {{ accordion.header('Owners', 'owners', 'metadata', icon='user-line') }}
+
+ {% for owner in brickset_owners %}
+ {% with id=owner.as_dataset() %}
+
+
+ {{ owner.fields.name }}
+
+ {% endwith %}
+ {% endfor %}
+
+ {{ accordion.footer() }}
+ {% endif %}
+ {% if brickset_purchase_locations | length %}
+ {{ accordion.header('Purchase location', 'purchase-location', 'metadata', icon='building-line') }}
+
{{ name }}
+
+
+ None
+ {% for purchase_location in brickset_purchase_locations %}
+ {{ purchase_location.fields.name }}
+ {% endfor %}
+
+
+ {{ accordion.footer() }}
+ {% endif %}
+ {% if brickset_storages | length %}
+ {{ accordion.header('Storage', 'storage', 'metadata', icon='archive-2-line') }}
+
{{ name }}
+
+
+ None
+ {% for storage in brickset_storages %}
+ {{ storage.fields.name }}
+ {% endfor %}
+
+
+ {{ accordion.footer() }}
+ {% endif %}
+ {% if brickset_tags | length %}
+ {{ accordion.header('Tags', 'tags', 'metadata', icon='price-tag-2-line') }}
+
+ {{ accordion.footer() }}
+ {% endif %}
{% endif %}