forked from FrederikBaerentsen/BrickTracker
Set tags
This commit is contained in:
+10
-1
@@ -12,7 +12,13 @@
|
||||
{% for owner in brickset_owners %}
|
||||
{% with checked=item.fields[owner.as_column()] %}
|
||||
data-{{ owner.as_dataset() }}="{{ checked }}"
|
||||
{% if checked %} data-owner-{{ loop.index }}="{{ owner.fields.name | lower }}"{% endif %}
|
||||
{% if checked %} data-search-owner-{{ loop.index }}="{{ owner.fields.name | lower }}"{% endif %}
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
{% for tag in brickset_tags %}
|
||||
{% with checked=item.fields[tag.as_column()] %}
|
||||
data-{{ tag.as_dataset() }}="{{ checked }}"
|
||||
{% if checked %} data-search-tag-{{ loop.index }}="{{ tag.fields.name | lower }}"{% endif %}
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
@@ -21,6 +27,9 @@
|
||||
{{ card.image(item, solo=solo, last=last, caption=item.fields.name, alt=item.fields.set) }}
|
||||
<div class="card-body border-bottom-0 {% if not solo %}p-1{% endif %}">
|
||||
{{ badge.theme(item.theme.name, solo=solo, last=last) }}
|
||||
{% for tag in brickset_tags %}
|
||||
{{ badge.tag(item, tag, solo=solo, last=last) }}
|
||||
{% endfor %}
|
||||
{{ badge.year(item.fields.year, solo=solo, last=last) }}
|
||||
{{ badge.parts(item.fields.number_of_parts, solo=solo, last=last) }}
|
||||
{{ badge.total_minifigures(item.fields.total_minifigures, solo=solo, last=last) }}
|
||||
|
||||
@@ -1,20 +1,34 @@
|
||||
{% if g.login.is_authenticated() %}
|
||||
{{ accordion.header('Owners', 'owner', 'set-details', icon='group-line', class='p-0') }}
|
||||
<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"><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() }}
|
||||
{{ accordion.header('Management', 'management', 'set-details', expanded=true, icon='settings-4-line') }}
|
||||
<h5 class="border-bottom">Data</h5>
|
||||
<a href="{{ item.url_for_refresh() }}" class="btn btn-primary" role="button"><i class="ri-refresh-line"></i> Refresh the set data</a>
|
||||
{{ accordion.footer() }}
|
||||
{{ accordion.header('Owners', 'owner', 'set-details', icon='group-line', class='p-0') }}
|
||||
<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"><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() }}
|
||||
{{ accordion.header('Tags', 'tag', 'set-details', icon='price-tag-2-line', class='p-0') }}
|
||||
<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"><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() }}
|
||||
{{ accordion.header('Management', 'management', 'set-details', expanded=true, icon='settings-4-line') }}
|
||||
<h5 class="border-bottom">Data</h5>
|
||||
<a href="{{ item.url_for_refresh() }}" class="btn btn-primary" role="button"><i class="ri-refresh-line"></i> Refresh the set data</a>
|
||||
{{ accordion.footer() }}
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user