Adding a bulk delete option to the scopes page

This commit is contained in:
Ian Roddis committed 2026-08-10 12:15:09 -03:00
1 parent a9c4c16d4f
commit 7a15d9f7c0
5 files changed
+137 -40

No files matched your search

+6 -12
View File
@@ -21,6 +21,9 @@
<table class="table sortable">
<thead>
<tr>
{% if can_write_scopes %}
<th data-sort-off><input type="checkbox" id="scopes-select-all" title="Select all"></th>
{% endif %}
<th>Scope</th>
<th>Manufacturer</th>
<th>Model</th>
@@ -30,9 +33,6 @@
{% for ct in column_types %}
<th data-sort-off>{{ ct.name }}</th>
{% endfor %}
{% if can_write_scopes %}
<th data-sort-off></th>
{% endif %}
</tr>
</thead>
<tbody>
@@ -40,6 +40,9 @@
{% set scope = row.scope %}
{% set info = row.info %}
<tr id="scope-row-{{ scope.id }}">
{% if can_write_scopes %}
<td><input type="checkbox" name="scope_ids" value="{{ scope.id }}"></td>
{% endif %}
<td>
<strong><a href="/admin/augmented-parts/{{ scope.id }}">{{ scope.description }}</a></strong>
{% if scope.sku %}<br><span class="muted">{{ scope.sku }}</span>{% endif %}
@@ -70,15 +73,6 @@
{% endif %}
</td>
{% endfor %}
{% if can_write_scopes %}
<td class="row-actions">
<button class="btn btn-danger"
hx-delete="/scopes/{{ scope.id }}"
hx-target="#scope-row-{{ scope.id }}"
hx-swap="outerHTML"
hx-confirm="Delete {{ scope.sku or scope.description }}?">Delete</button>
</td>
{% endif %}
</tr>
{% else %}
<tr>