2025-01-29 18:14:44 +01:00
{% if g.login.is_authenticated() %}
2025-02-04 17:39:47 +01:00
{{ accordion.header('Management', 'set-management', 'set-details', icon='settings-4-line', class='p-0') }}
2025-02-04 12:40:49 +01:00
{{ accordion.header('Owners', 'owner', 'set-management', icon='group-line', class='p-0') }}
2025-02-04 12:52:18 +01:00
< ul class = "list-group list-group-flush" >
{% if brickset_owners | length %}
{% for owner in brickset_owners %}
< li class = "d-flex list-group-item list-group-item-action text-nowrap" > {{ form.checkbox(item, owner, delete=delete) }}< / li >
{% endfor %}
{% else %}
< li class = "list-group-item list-group-item-action text-center" > < i class = "ri-error-warning-line" > < / i > No owner found.< / li >
{% endif %}
< / ul >
< div class = "list-group list-group-flush border-top" >
< a class = "list-group-item list-group-item-action" href = "{{ url_for('admin.admin', open_owner=true) }}" > < i class = "ri-settings-4-line" > < / i > Manage the set owners< / a >
< / div >
{{ accordion.footer() }}
2025-02-04 17:39:47 +01:00
{{ accordion.header('Purchase', 'purchase', 'set-management', icon='wallet-3-line') }}
2025-02-04 17:03:39 +01:00
< div class = "alert alert-info" role = "alert" > The expected date format here is < code > yyyy/mm/dd< / code > (year/month/day), but you can configured how it is displayed in the set card with the < code > PURCHASE_DATE_FORMAT< / code > variable.< / div >
< div class = "row row-cols-lg-auto g-1 justify-content-start align-items-center pb-2" >
< div class = "col-12" >
{{ form.input('Date', item.fields.id, 'date', item.url_for_purchase_date(), item.purchase_date(standard=true), icon='calendar-line', date=true) }}
< / div >
< div class = "col-12 flex-grow-1" >
{{ form.input('Price', item.fields.id, 'price', item.url_for_purchase_price(), item.fields.purchase_price, suffix=config['PURCHASE_CURRENCY'], icon='wallet-3-line') }}
< / div >
< div class = "col-12 flex-grow-1" >
{% if brickset_purchase_locations | length %}
2025-02-04 19:05:38 +01:00
{{ form.select('Location', item.fields.id, brickset_purchase_locations.as_prefix(), brickset_purchase_locations.url_for_set_value(item.fields.id), item.fields.purchase_location, brickset_purchase_locations, icon='building-line', delete=delete) }}
2025-02-04 17:03:39 +01:00
{% else %}
< i class = "ri-error-warning-line" > < / i > No purchase location found.
{% endif %}
< / div >
< / div >
2025-02-04 12:52:18 +01:00
< hr >
< a href = "{{ url_for('admin.admin', open_purchase_location=true) }}" class = "btn btn-primary" role = "button" > < i class = "ri-settings-4-line" > < / i > Manage the set purchase locations< / a >
{{ accordion.footer() }}
2025-02-04 12:40:49 +01:00
{{ accordion.header('Storage', 'storage', 'set-management', icon='archive-2-line') }}
2025-02-04 12:52:18 +01:00
{% if brickset_storages | length %}
2025-02-04 19:05:38 +01:00
{{ form.select('Storage', item.fields.id, brickset_storages.as_prefix(), brickset_storages.url_for_set_value(item.fields.id), item.fields.storage, brickset_storages, icon='building-line', delete=delete) }}
2025-02-04 12:52:18 +01:00
{% else %}
< p class = "text-center" > < i class = "ri-error-warning-line" > < / i > No storage found.< / p >
{% endif %}
< hr >
2025-02-04 12:34:46 +01:00
< a href = "{{ url_for('admin.admin', open_storage=true) }}" class = "btn btn-primary" role = "button" > < i class = "ri-settings-4-line" > < / i > Manage the set storages< / a >
2025-02-04 12:52:18 +01:00
{{ accordion.footer() }}
2025-02-04 12:40:49 +01:00
{{ accordion.header('Tags', 'tag', 'set-management', icon='price-tag-2-line', class='p-0') }}
2025-02-04 12:52:18 +01:00
< ul class = "list-group list-group-flush" >
{% if brickset_tags | length %}
{% for tag in brickset_tags %}
< li class = "d-flex list-group-item list-group-item-action text-nowrap" > {{ form.checkbox(item, tag, delete=delete) }}< / li >
{% endfor %}
{% else %}
< li class = "list-group-item list-group-item-action text-center" > < i class = "ri-error-warning-line" > < / i > No tag found.< / li >
{% endif %}
< / ul >
< div class = "list-group list-group-flush border-top" >
< a class = "list-group-item list-group-item-action" href = "{{ url_for('admin.admin', open_tag=true) }}" > < i class = "ri-settings-4-line" > < / i > Manage the set tags< / a >
< / div >
{{ accordion.footer() }}
2025-02-04 12:40:49 +01:00
{{ accordion.header('Data', 'data', 'set-management', icon='database-2-line') }}
2025-02-04 12:52:18 +01:00
< a href = "{{ item.url_for_refresh() }}" class = "btn btn-primary" role = "button" > < i class = "ri-refresh-line" > < / i > Refresh the set data< / a >
2025-02-04 12:40:49 +01:00
{{ accordion.footer() }}
2025-01-31 18:08:53 +01:00
{{ accordion.footer() }}
2025-01-29 18:14:44 +01:00
{% endif %}