From ddd37e0f5b2b3006b6708a243075eb0c5fabce35 Mon Sep 17 00:00:00 2001 From: Gregoo Date: Mon, 27 Jan 2025 18:41:08 +0100 Subject: [PATCH] Fix hide instructions block placement --- templates/set/card.html | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/templates/set/card.html b/templates/set/card.html index d6729ee..e9612eb 100644 --- a/templates/set/card.html +++ b/templates/set/card.html @@ -35,26 +35,28 @@ {% endfor %} {% endif %} - {% if solo and not config['HIDE_SET_INSTRUCTIONS'] %} + {% 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 + {% 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') }} +
+ {% 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 %} - {% endif %} - {% if g.login.is_authenticated() %} - Download instructions from Rebrickable - {% endif %} -
- {{ accordion.footer() }} + {% if g.login.is_authenticated() %} + Download instructions from Rebrickable + {% endif %} +
+ {{ accordion.footer() }} + {% endif %} {{ 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.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())}}