WIP: Initial work on deduplicating the minifigures and parts #57

Draft
gregoo wants to merge 19 commits from gregoo/BrickTracker:master into master
Showing only changes of commit 426f0bb123 - Show all commits

View File

@ -35,9 +35,10 @@
{% endfor %} {% endfor %}
</ul> </ul>
{% endif %} {% endif %}
{% if solo and not config['HIDE_SET_INSTRUCTIONS'] %} {% if solo %}
<div class="accordion accordion-flush border-top" id="set-details"> <div class="accordion accordion-flush border-top" id="set-details">
{% if not delete %} {% 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') }} {{ accordion.header('Instructions', 'instructions', 'set-details', expanded=open_instructions, quantity=item.instructions | length, icon='file-line', class='p-0') }}
<div class="list-group list-group-flush"> <div class="list-group list-group-flush">
{% if item.instructions | length %} {% if item.instructions | length %}
@ -55,6 +56,7 @@
{% endif %} {% endif %}
</div> </div>
{{ accordion.footer() }} {{ accordion.footer() }}
{% endif %}
{{ accordion.table(item.parts(), 'Parts', 'parts-inventory', 'set-details', 'part/table.html', icon='shapes-line')}} {{ accordion.table(item.parts(), 'Parts', 'parts-inventory', 'set-details', 'part/table.html', icon='shapes-line')}}
{% for minifigure in item.minifigures() %} {% 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())}} {{ 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())}}