Merge remote-tracking branch 'origin/master' into instructions

This commit is contained in:
2025-01-24 19:40:30 +01:00
198 changed files with 3436 additions and 1888 deletions
+2 -7
View File
@@ -8,9 +8,9 @@
</div>
<div class="accordion accordion-flush" id="instructions">
{{ accordion.header('Instructions danger zone', 'instructions-delete', 'instructions', expanded=true, danger=true) }}
{% if item.brickset %}
{% if item.rebrickable %}
<div class="d-flex justify-content-center">
{% with item=item.brickset %}
{% with item=item.rebrickable %}
{% include 'set/mini.html' %}
{% endwith %}
</div>
@@ -28,8 +28,3 @@
<div class="card-footer"></div>
</div>
</div>
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", () => {
baguetteBox.run('[data-lightbox]');
});
</script>
+2 -7
View File
@@ -8,9 +8,9 @@
</div>
<div class="accordion accordion-flush" id="instructions">
{{ accordion.header('Management', 'instructions-rename', 'instructions', expanded=true) }}
{% if item.brickset %}
{% if item.rebrickable %}
<div class="d-flex justify-content-center">
{% with item=item.brickset %}
{% with item=item.rebrickable %}
{% include 'set/mini.html' %}
{% endwith %}
</div>
@@ -34,8 +34,3 @@
<div class="card-footer"></div>
</div>
</div>
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", () => {
baguetteBox.run('[data-lightbox]');
});
</script>
+9 -12
View File
@@ -1,14 +1,14 @@
{% import 'macro/table.html' as table %}
<div class="table-responsive-sm">
<table class="table table-striped align-middle" id="instructions">
<table data-table="{% if all %}true{% endif %}" class="table table-striped align-middle" id="instructions">
<thead>
<tr>
<th scope="col"><i class="ri-file-line fw-normal"></i> Filename</th>
<th scope="col"><i class="ri-hashtag fw-normal"></i> Set</th>
<th class="no-sort" scope="col"><i class="ri-image-line fw-normal"></i> Image</th>
<th data-table-no-sort="true" class="no-sort" scope="col"><i class="ri-image-line fw-normal"></i> Image</th>
{% if g.login.is_authenticated() %}
<th class="no-sort" scope="col"><i class="ri-settings-4-line fw-normal"></i> Actions</th>
<th data-table-no-sort="true" class="no-sort" scope="col"><i class="ri-settings-4-line fw-normal"></i> Actions</th>
{% endif %}
</tr>
</thead>
@@ -23,15 +23,15 @@
{%- if item.allowed -%}
</a>
{% endif %}
<span class="badge rounded-pill text-bg-info fw-normal"><i class="ri-hard-drive-line"></i> {{ item.human_size() }}</span>
<span class="badge rounded-pill text-bg-light border fw-normal"><i class="ri-calendar-line"></i> {{ item.human_time() }}</span>
<span data-search="exclude" class="badge rounded-pill text-bg-info fw-normal"><i class="ri-hard-drive-line"></i> {{ item.human_size() }}</span>
<span data-search="exclude" class="badge rounded-pill text-bg-light border fw-normal"><i class="ri-calendar-line"></i> {{ item.human_time() }}</span>
</td>
<td>
{% if item.number %}<span class="badge text-bg-secondary fw-normal"><i class="ri-hashtag"></i> {{ item.number }}</span>{% endif %}
{% if item.brickset %}{{ item.brickset.fields.name }}{% endif %}
{% if item.set %}<span class="badge text-bg-secondary fw-normal"><i class="ri-hashtag"></i> {{ item.set }}</span>{% endif %}
{% if item.rebrickable %}{{ item.rebrickable.fields.name }}{% endif %}
</td>
{% if item.brickset %}
{{ table.image(item.brickset.url_for_image(), caption=item.brickset.fields.name, alt=item.brickset.fields.set_num) }}
{% if item.rebrickable %}
{{ table.image(item.rebrickable.url_for_image(), caption=item.rebrickable.fields.name, alt=item.rebrickable.fields.set) }}
{% else %}
<td><i class="ri-file-warning-line"></i></td>
{% endif %}
@@ -46,6 +46,3 @@
</tbody>
</table>
</div>
{% if all %}
{{ table.dynamic('instructions', no_sort='2,3')}}
{% endif %}
+2 -2
View File
@@ -26,8 +26,8 @@
<div class="mb-3">
<label for="file" class="form-label">Instructions file</label>
<div class="input-group">
<input type="file" class="form-control" id="file" name="file" accept="{{ ','.join(config['INSTRUCTIONS_ALLOWED_EXTENSIONS'].value) }}">
<span class="input-group-text">{{ ', '.join(config['INSTRUCTIONS_ALLOWED_EXTENSIONS'].value) }}</span>
<input type="file" class="form-control" id="file" name="file" accept="{{ ','.join(config['INSTRUCTIONS_ALLOWED_EXTENSIONS']) }}">
<span class="input-group-text">{{ ', '.join(config['INSTRUCTIONS_ALLOWED_EXTENSIONS']) }}</span>
</div>
</div>
<div class="text-end">