BrickTracker/templates/minifigure/card.html

29 lines
1.6 KiB
HTML
Raw Permalink Normal View History

2025-01-17 11:03:00 +01:00
{% import 'macro/accordion.html' as accordion %}
{% import 'macro/badge.html' as badge %}
{% import 'macro/card.html' as card %}
<div class="card mb-3 flex-fill {% if solo %}card-solo{% endif %}">
{{ card.header(item, item.fields.name, solo=solo, number=item.clean_number(), icon='user-line') }}
{{ card.image(item, solo=solo, last=last, caption=item.fields.name, alt=item.fields.fig_num, medium=true) }}
<div class="card-body border-bottom {% if not solo %}p-1{% endif %}">
{% if last %}
{{ badge.set(item.fields.set_num, solo=solo, last=last, id=item.fields.u_id) }}
{{ badge.quantity(item.fields.quantity, solo=solo, last=last) }}
{% endif %}
{{ badge.quantity(item.fields.total_quantity, solo=solo, last=last) }}
2025-01-17 11:03:00 +01:00
{{ badge.total_sets(using | length, solo=solo, last=last) }}
{{ badge.total_missing(item.fields.total_missing, solo=solo, last=last) }}
{% if not last %}
{{ badge.rebrickable(item, solo=solo, last=last) }}
{% endif %}
</div>
{% if solo %}
<div class="accordion accordion-flush" id="minifigure-details">
{{ accordion.table(item.generic_parts(), 'Parts', item.fields.fig_num, 'minifigure-details', 'part/table.html', icon='shapes-line', alt=item.fields.fig_num, read_only_missing=read_only_missing)}}
{{ accordion.cards(using, 'Sets using this minifigure', 'using-inventory', 'minifigure-details', 'set/card.html', icon='hashtag') }}
{{ accordion.cards(missing, 'Sets missing parts of this minifigure', 'missing-inventory', 'minifigure-details', 'set/card.html', icon='error-warning-line') }}
</div>
<div class="card-footer"></div>
{% endif %}
</div>