Wrap form metadata in accordion for legibility

This commit is contained in:
Gregoo 2025-02-03 10:49:23 +01:00
parent 4cf91a6edd
commit 7453d97c81

View File

@ -1,3 +1,5 @@
{% import 'macro/accordion.html' as accordion %}
{% extends 'base.html' %} {% extends 'base.html' %}
{% block title %} - {% if not bulk %}Add a set{% else %}Bulk add sets{% endif %}{% endblock %} {% block title %} - {% if not bulk %}Add a set{% else %}Bulk add sets{% endif %}{% endblock %}
@ -33,8 +35,10 @@
Add without confirmation Add without confirmation
</label> </label>
</div> </div>
<h6 class="border-bottom mt-2">Metadata</h6>
<div class="accordion accordion" id="metadata">
{% if brickset_owners | length %} {% if brickset_owners | length %}
<h5 class="border-bottom mt-2">Owners</h5> {{ accordion.header('Owners', 'owners', 'metadata', icon='user-line') }}
<div id="add-owners"> <div id="add-owners">
{% for owner in brickset_owners %} {% for owner in brickset_owners %}
{% with id=owner.as_dataset() %} {% with id=owner.as_dataset() %}
@ -45,9 +49,10 @@
{% endwith %} {% endwith %}
{% endfor %} {% endfor %}
</div> </div>
{{ accordion.footer() }}
{% endif %} {% endif %}
{% if brickset_tags | length %} {% if brickset_tags | length %}
<h5 class="border-bottom mt-2">Tags</h5> {{ accordion.header('Tags', 'tags', 'metadata', icon='price-tag-2-line') }}
<div id="add-tags"> <div id="add-tags">
{% for tag in brickset_tags %} {% for tag in brickset_tags %}
{% with id=tag.as_dataset() %} {% with id=tag.as_dataset() %}
@ -58,7 +63,9 @@
{% endwith %} {% endwith %}
{% endfor %} {% endfor %}
</div> </div>
{{ accordion.footer() }}
{% endif %} {% endif %}
</div>
<hr> <hr>
<div class="mb-3"> <div class="mb-3">
<p> <p>