From 7c95583345fbf94dfb13cd3d14cd11bc751d8851 Mon Sep 17 00:00:00 2001 From: Frederik Baerentsen Date: Sat, 27 Sep 2025 23:30:13 +0200 Subject: [PATCH] Changed the "Multiple Copies Available" view and fixed border formatting. --- templates/set.html | 41 +---------------------------------------- templates/set/card.html | 8 ++++---- 2 files changed, 5 insertions(+), 44 deletions(-) diff --git a/templates/set.html b/templates/set.html index 29e9291..f004d6f 100644 --- a/templates/set.html +++ b/templates/set.html @@ -29,48 +29,9 @@ {% set current_item_id = item.fields.id %} {% for instance in all_instances %}
- {% with item=instance, index=loop.index0, tiny=false %} + {% with item=instance, index=loop.index0, tiny=false, current_viewing=(instance.fields.id == current_item_id) %}
{% include 'set/card.html' %} - - {% set instance_name = [] %} - {% if instance.fields.storage %} - {% set _ = instance_name.append(instance.fields.storage) %} - {% endif %} - {% if instance.fields.purchase_location %} - {% set _ = instance_name.append("from " + instance.fields.purchase_location) %} - {% endif %} - {% set instance_tags = [] %} - {% for tag in brickset_tags %} - {% if instance.fields[tag.as_column()] %} - {% set _ = instance_tags.append(tag.fields.name) %} - {% endif %} - {% endfor %} - {% if instance_tags %} - {% set _ = instance_name.append("[" + instance_tags | join(", ") + "]") %} - {% endif %} - {% if instance.fields.purchase_date %} - {% set _ = instance_name.append("(" + instance.purchase_date() + ")") %} - {% endif %} - {% if instance_name %} -
- - {{ instance_name | join(" ") }} - {% if instance.fields.id == current_item_id %} -
Currently Viewing - {% endif %} -
-
- {% else %} -
- - Copy #{{ loop.index }} - {% if instance.fields.id == current_item_id %} -
Current - {% endif %} -
-
- {% endif %}
{% endwith %}
diff --git a/templates/set/card.html b/templates/set/card.html index 4cfb5e4..a5e46f9 100644 --- a/templates/set/card.html +++ b/templates/set/card.html @@ -3,7 +3,7 @@ {% import 'macro/card.html' as card %} {% import 'macro/form.html' as form %} -
{{ card.header(item, item.fields.name, solo=solo, identifier=item.fields.set) }} {{ card.image(item, solo=solo, last=last, caption=item.fields.name, alt=item.fields.set) }} -
+
{{ badge.theme(item.theme.name, solo=solo, last=last) }} {% for tag in brickset_tags %} {{ badge.tag(item, tag, solo=solo, last=last) }} @@ -86,14 +86,14 @@ {% endif %}
{% if not tiny and brickset_statuses | length %} -
    +
      {% for status in brickset_statuses %}
    • {{ form.checkbox(status.fields.name, item.fields.id, status.as_dataset(), status.url_for_set_state(item.fields.id), item.fields[status.as_column()], parent='set', delete=delete) }}
    • {% endfor %}
    {% endif %} {% if solo %} -
    +
    {% 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') }}