{% import 'macro/accordion.html' as accordion %} {% import 'macro/badge.html' as badge %} {% import 'macro/card.html' as card %} {% import 'macro/form.html' as form %}
{{ card.header(item, item.fields.name, solo=solo, identifier=item.fields.set) }} {{ card.image(item, solo=solo, last=last, caption=item.fields.name, alt=item.fields.set) }}
{# Render badges in configured order based on context (grid view vs detail view) #} {{ badge.render_ordered_badges(item, brickset_tags, brickset_owners, brickset_storages, brickset_purchase_locations, solo=solo, last=last, context='detail' if solo else 'grid') }}
{# Show notes based on context and config #} {% if item.fields.description and item.fields.description | trim %} {% if (solo and config['SHOW_NOTES_DETAIL']) or (not solo and config['SHOW_NOTES_GRID']) %}
{% endif %} {% endif %} {% if not tiny and brickset_statuses | length %} {% endif %} {% if solo %}
{% if not delete %} {% if not config['HIDE_SET_INSTRUCTIONS'] %} {{ accordion.header('Instructions', 'instructions', 'set-details', expanded=open_instructions, quantity=item.instructions | length, icon='file-line', class='p-0') }}
{% if item.instructions | length %} {% for instruction in item.instructions %} {{ instruction.filename }} {% endfor %} {% else %} No instructions file found. {% if g.login.is_authenticated() %} Upload an instructions file {% endif %} {% endif %} {% if g.login.is_authenticated() %} Download instructions {% endif %}
{{ accordion.footer() }} {% endif %} {{ accordion.table(item.parts(), 'Parts', 'parts-inventory', 'set-details', 'part/table.html', icon='shapes-line', hamburger_menu=g.login.is_authenticated())}} {% for minifigure in item.minifigures() %} {{ accordion.table(minifigure.parts(), minifigure.fields.name, minifigure.fields.figure, 'set-details', 'part/table.html', quantity=minifigure.fields.quantity, icon='group-line', image=minifigure.url_for_image(), alt=minifigure.fields.figure, details=minifigure.url(), hamburger_menu=g.login.is_authenticated())}} {% endfor %} {% include 'set/management.html' %} {% endif %} {% if g.login.is_authenticated() %} {{ accordion.header('Danger zone', 'danger-zone', 'set-details', expanded=delete, danger=true, class='text-end') }} {% if delete %}
{% if error %}{% endif %} Back to the set
{% else %} Delete the set {% endif %} {{ accordion.footer() }} {% endif %}
{% endif %}
{% if solo and g.login.is_authenticated() %} {% endif %}