126 lines
7.1 KiB
HTML
126 lines
7.1 KiB
HTML
<div id="grid-filter" class="collapse {% if config['SHOW_GRID_FILTERS'] %}show{% endif %} row row-cols-lg-auto g-1 justify-content-center align-items-center pb-2">
|
|
<div class="col-12 flex-grow-1">
|
|
<label class="visually-hidden" for="grid-status">Status</label>
|
|
<div class="input-group">
|
|
<span class="input-group-text"><i class="ri-checkbox-line"></i><span class="ms-1 d-none d-md-inline"> Status</span></span>
|
|
<select id="grid-status" class="form-select"
|
|
data-filter="metadata"
|
|
autocomplete="off">
|
|
<option value="" {% if not current_status_filter %}selected{% endif %}>All</option>
|
|
{% if not config['HIDE_TABLE_MISSING_PARTS'] %}
|
|
<option value="has-missing" {% if current_status_filter == 'has-missing' %}selected{% endif %}>Has missing pieces</option>
|
|
<option value="-has-missing" {% if current_status_filter == '-has-missing' %}selected{% endif %}>Has NO missing pieces</option>
|
|
{% endif %}
|
|
{% if not config['HIDE_TABLE_DAMAGED_PARTS'] %}
|
|
<option value="has-damaged" {% if current_status_filter == 'has-damaged' %}selected{% endif %}>Has damaged pieces</option>
|
|
<option value="-has-damaged" {% if current_status_filter == '-has-damaged' %}selected{% endif %}>Has NO damaged pieces</option>
|
|
{% endif %}
|
|
{% if not config['HIDE_SET_INSTRUCTIONS'] %}
|
|
<option value="-has-missing-instructions" {% if current_status_filter == '-has-missing-instructions' %}selected{% endif %}>Has instructions</option>
|
|
<option value="has-missing-instructions" {% if current_status_filter == 'has-missing-instructions' %}selected{% endif %}>Is MISSING instructions</option>
|
|
{% endif %}
|
|
{% if brickset_storages | length %}
|
|
<option value="has-storage" {% if current_status_filter == 'has-storage' %}selected{% endif %}>Is in storage</option>
|
|
<option value="-has-storage" {% if current_status_filter == '-has-storage' %}selected{% endif %}>Is NOT in storage</option>
|
|
{% endif %}
|
|
{% for status in brickset_statuses %}
|
|
<option value="{{ status.as_dataset() }}" {% if current_status_filter == status.as_dataset() %}selected{% endif %}>{{ status.fields.name }}</option>
|
|
<option value="-{{ status.as_dataset() }}" {% if current_status_filter == ('-' + status.as_dataset()) %}selected{% endif %}>NOT: {{ status.fields.name }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="col-12 flex-grow-1">
|
|
<label class="visually-hidden" for="grid-theme">Theme</label>
|
|
<div class="input-group">
|
|
<span class="input-group-text"><i class="ri-price-tag-3-line"></i><span class="ms-1 d-none d-md-inline"> Theme</span></span>
|
|
<select id="grid-theme" class="form-select"
|
|
data-filter="value" data-filter-attribute="theme"
|
|
autocomplete="off">
|
|
<option value="" {% if not current_theme_filter %}selected{% endif %}>All</option>
|
|
{% for theme in collection.themes %}
|
|
<option value="{{ theme | lower }}" {% if current_theme_filter == (theme | lower) %}selected{% endif %}>{{ theme }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
{% if brickset_owners | length %}
|
|
<div class="col-12 flex-grow-1">
|
|
<label class="visually-hidden" for="grid-owner">Owner</label>
|
|
<div class="input-group">
|
|
<span class="input-group-text"><i class="ri-user-line"></i><span class="ms-1 d-none d-md-inline"> Owner</span></span>
|
|
<select id="grid-owner" class="form-select"
|
|
data-filter="metadata"
|
|
autocomplete="off">
|
|
<option value="" {% if not current_owner_filter %}selected{% endif %}>All</option>
|
|
{% for owner in brickset_owners %}
|
|
<option value="{{ owner.as_dataset() }}" {% if current_owner_filter == owner.as_dataset() %}selected{% endif %}>{{ owner.fields.name }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% if brickset_purchase_locations | length %}
|
|
<div class="col-12 flex-grow-1">
|
|
<label class="visually-hidden" for="grid-owner">Purchase location</label>
|
|
<div class="input-group">
|
|
<span class="input-group-text"><i class="ri-building-line"></i><span class="ms-1 d-none d-md-inline"> Purchase location</span></span>
|
|
<select id="grid-purchase-location" class="form-select"
|
|
data-filter="value" data-filter-attribute="purchase-location"
|
|
autocomplete="off">
|
|
<option value="" {% if not current_purchase_location_filter %}selected{% endif %}>All</option>
|
|
{% for purchase_location in brickset_purchase_locations %}
|
|
<option value="{{ purchase_location.fields.id }}" {% if current_purchase_location_filter == purchase_location.fields.id %}selected{% endif %}>{{ purchase_location.fields.name }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% if brickset_storages | length %}
|
|
<div class="col-12 flex-grow-1">
|
|
<label class="visually-hidden" for="grid-owner">Storage</label>
|
|
<div class="input-group">
|
|
<span class="input-group-text"><i class="ri-archive-2-line"></i><span class="ms-1 d-none d-md-inline"> Storage</span></span>
|
|
<select id="grid-storage" class="form-select"
|
|
data-filter="value" data-filter-attribute="storage"
|
|
autocomplete="off">
|
|
<option value="" {% if not current_storage_filter %}selected{% endif %}>All</option>
|
|
{% for storage in brickset_storages %}
|
|
<option value="{{ storage.fields.id }}" {% if current_storage_filter == storage.fields.id %}selected{% endif %}>{{ storage.fields.name }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% if brickset_tags | length %}
|
|
<div class="col-12 flex-grow-1">
|
|
<label class="visually-hidden" for="grid-tag">Tag</label>
|
|
<div class="input-group">
|
|
<span class="input-group-text"><i class="ri-price-tag-2-line"></i><span class="ms-1 d-none d-md-inline"> Tag</span></span>
|
|
<select id="grid-tag" class="form-select"
|
|
data-filter="metadata"
|
|
autocomplete="off">
|
|
<option value="" {% if not current_tag_filter %}selected{% endif %}>All</option>
|
|
{% for tag in brickset_tags %}
|
|
<option value="{{ tag.as_dataset() }}" {% if current_tag_filter == tag.as_dataset() %}selected{% endif %}>{{ tag.fields.name }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
<div class="col-12 flex-grow-1">
|
|
<label class="visually-hidden" for="grid-year">Year</label>
|
|
<div class="input-group">
|
|
<span class="input-group-text"><i class="ri-calendar-line"></i><span class="ms-1 d-none d-md-inline"> Year</span></span>
|
|
<select id="grid-year" class="form-select"
|
|
data-filter="value" data-filter-attribute="year"
|
|
autocomplete="off">
|
|
<option value="" {% if not current_year_filter %}selected{% endif %}>All</option>
|
|
{% for year in collection.years %}
|
|
<option value="{{ year }}" {% if current_year_filter == year %}selected{% endif %}>{{ year }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|