{% 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, number=item.fields.set_num) }} {{ card.image(item, solo=solo, last=last, caption=item.fields.name, alt=item.fields.set_num) }}
{{ badge.theme(item.theme_name, solo=solo, last=last) }} {{ badge.year(item.fields.year, solo=solo, last=last) }} {{ badge.parts(item.fields.num_parts, solo=solo, last=last) }} {{ badge.total_minifigures(item.fields.total_minifigures, solo=solo, last=last) }} {{ badge.total_missing(item.fields.total_missing, solo=solo, last=last) }} {% if not last %} {% if not solo %} {{ badge.instructions(item, solo=solo, last=last) }} {% endif %} {{ badge.rebrickable(item, solo=solo, last=last) }} {% endif %}
{% if not tiny %} {% endif %} {% if solo %}
{% if not delete %} {{ 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 %}
{{ accordion.footer() }} {{ accordion.table(item.parts(), 'Parts', 'parts-inventory', 'set-details', 'part/table.html', icon='shapes-line')}} {% for minifigure in item.minifigures() %} {{ accordion.table(minifigure.parts(), minifigure.fields.name, minifigure.fields.fig_num, 'set-details', 'part/table.html', quantity=minifigure.fields.quantity, icon='group-line', image=minifigure.url_for_image(), alt=minifigure.fields.fig_num, details=minifigure.url())}} {% endfor %} {% 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 %}