{% import 'macro/form.html' as form %} {% import 'macro/table.html' as table %}
{{ table.header(color=true, quantity=not no_quantity, sets=all, minifigures=all, checked=not all and not read_only, hamburger_menu=not all and not read_only, accordion_id=accordion_id|default('')) }} {% for item in table_collection %} {{ table.image(item.url_for_image(), caption=item.fields.name, alt=item.fields.part, accordion=solo) }} {% if not no_quantity %} {% if all %} {% else %} {% endif %} {% endif %} {% if not config['HIDE_TABLE_MISSING_PARTS'] %} {% endif %} {% if not config['HIDE_TABLE_DAMAGED_PARTS'] %} {% endif %} {% if all %} {% else %} {% if not config['HIDE_TABLE_CHECKED_PARTS'] and not read_only %} {% endif %} {% if g.login.is_authenticated() and not read_only %} {% set show_missing_menu = not config['HIDE_TABLE_MISSING_PARTS'] %} {% set show_checked_menu = not config['HIDE_TABLE_CHECKED_PARTS'] %} {% if show_missing_menu or show_checked_menu %} {% endif %} {% endif %} {% endif %} {% endfor %}
{{ item.fields.name }} {% if item.fields.spare %} Spare{% endif %} {% if all %} {{ table.rebrickable(item) }} {{ table.bricklink(item) }} {% endif %} {% if item.fields.color_rgb %}{% endif %} {{ item.fields.color_name }} {{ item.fields.total_quantity }}{% if quantity %}{{ item.fields.quantity * quantity }}{% else %}{{ item.fields.quantity }}{% endif %} {{ 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) }} {{ 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) }} {{ item.fields.total_sets }} {{ item.fields.total_minifigures }}
{{ form.checkbox('', item.fields.id, item.html_id('checked'), item.url_for_checked(), item.fields.checked | default(false), parent='part', delete=read_only) }}