2025-01-29 15:12:10 +01:00
{% import 'macro/form.html' as form %}
2025-01-17 11:03:00 +01:00
{% import 'macro/table.html' as table %}
< div class = "table-responsive-sm" >
2025-01-24 15:55:15 +01:00
< table data-table = "{% if all %}true{% endif %}" class = "table table-striped align-middle {% if not all %}sortable mb-0{% endif %}" { % if all % } id = "parts" { % endif % } >
2025-01-31 20:46:36 +01:00
{{ table.header(color=true, quantity=not no_quantity, sets=all, minifigures=all) }}
2025-01-17 11:03:00 +01:00
< tbody >
{% for item in table_collection %}
< tr >
2025-01-28 19:18:51 +01:00
{{ table.image(item.url_for_image(), caption=item.fields.name, alt=item.fields.part, accordion=solo) }}
2025-01-29 10:37:22 +01:00
< td data-sort = "{{ item.fields.name }}" >
2025-01-17 11:03:00 +01:00
< a class = "text-reset" href = "{{ item.url() }}" > {{ item.fields.name }}< / a >
2025-01-28 19:18:51 +01:00
{% if item.fields.spare %}< span class = "badge rounded-pill text-bg-warning fw-normal" > < i class = "ri-loop-left-line" > < / i > Spare< / span > {% endif %}
2025-01-17 11:03:00 +01:00
{% if all %}
{{ table.rebrickable(item) }}
{{ table.bricklink(item) }}
{% endif %}
< / td >
2025-01-29 10:37:22 +01:00
< td data-sort = "{{ item.fields.color_name }}" >
2025-01-29 11:43:18 +01:00
{% if item.fields.color_rgb %}< span class = "color-rgb color-rgb-table {% if item.fields.color == 9999 %}color-any{% endif %} align-middle border border-black" { % if item . fields . color ! = 9999 % } style = "background-color: #{{ item.fields.color_rgb }};" { % endif % } > < / span > {% endif %}
2025-01-29 10:36:43 +01:00
< span class = "align-middle" > {{ item.fields.color_name }}< / span >
< / td >
2025-01-17 11:03:00 +01:00
{% if not no_quantity %}
2025-01-17 15:35:23 +01:00
{% if all %}
< td > {{ item.fields.total_quantity }}< / td >
{% else %}
< td > {% if quantity %}{{ item.fields.quantity * quantity }}{% else %}{{ item.fields.quantity }}{% endif %}< / td >
{% endif %}
2025-01-17 11:03:00 +01:00
{% endif %}
2025-02-03 09:52:33 +01:00
{% if not config['HIDE_TABLE_MISSING_PARTS'] %}
< td data-sort = "{{ item.fields.total_missing }}" class = "table-td-input" >
{{ form.input('Missing', item.fields.id, item.html_id('missing'), item.url_for_problem('missing'), item.fields.total_missing, all=all, read_only=read_only) }}
< / td >
{% endif %}
{% if not config['HIDE_TABLE_DAMAGED_PARTS'] %}
< td data-sort = "{{ item.fields.total_damaged }}" class = "table-td-input" >
{{ form.input('Damaged', item.fields.id, item.html_id('damaged'), item.url_for_problem('damaged'), item.fields.total_damaged, all=all, read_only=read_only) }}
< / td >
{% endif %}
2025-01-17 11:03:00 +01:00
{% if all %}
< td > {{ item.fields.total_sets }}< / td >
< td > {{ item.fields.total_minifigures }}< / td >
{% endif %}
< / tr >
{% endfor %}
< / tbody >
< / table >
< / div >