Refactor case management links and button structure for improved readability and consistency

This commit is contained in:
Ross
2026-02-09 11:24:43 +00:00
parent 25e5ef78ed
commit 45e01a78c1
2 changed files with 71 additions and 71 deletions
@@ -1,4 +1,4 @@
<div class="btn-group btn-group-sm me-2" role="group" aria-label="management-actions"> <div class="btn-group btn-group-sm me-2" role="group" aria-label="management-actions">
<a class="btn btn-outline-secondary" href="{% url 'atlas:collection_case_displaysetup_legacy' collection.pk casedetail.case.pk %}" title="Setup default display"> <a class="btn btn-outline-secondary" href="{% url 'atlas:collection_case_displaysetup_legacy' collection.pk casedetail.case.pk %}" title="Setup default display">
<i class="bi bi-display"></i> <i class="bi bi-display"></i>
</a> </a>
@@ -22,23 +22,23 @@
<i class="bi bi-link-45deg"></i> <i class="bi bi-link-45deg"></i>
</a> </a>
{% endif %} {% endif %}
</div> </div>
<div class="btn-group btn-group-sm" role="group" aria-label="status-indicator"> <div class="btn-group btn-group-sm" role="group" aria-label="status-indicator">
{% if casedetail.default_viewerstate %} {% if casedetail.default_viewerstate %}
<button type="button" class="btn btn-sm btn-outline-success" aria-disabled="true" title="This case has a default viewerstate defined"> <button type="button" class="btn btn-sm btn-outline-success" aria-disabled="true" title="This case has a default viewerstate defined">
<i class="bi bi-check"></i> <i class="bi bi-check"></i>
</button> </button>
{% endif %} {% endif %}
</div> </div>
{# Remove button (HTMX) - only shown when the surrounding template has `can_edit` true #} {# Remove button (HTMX) - only shown when the surrounding template has `can_edit` true #}
{% if can_edit %} {% if can_edit %}
<form class="d-inline ms-2 m-0" hx-post="{% url 'atlas:remove_case_from_collection' casedetail.case.pk collection.pk %}" hx-target="closest li" hx-swap="outerHTML" hx-confirm="Remove this case from the collection?"> <form class="d-inline ms-2 m-0" hx-post="{% url 'atlas:remove_case_from_collection' casedetail.case.pk collection.pk %}" hx-target="closest li" hx-swap="outerHTML" hx-confirm="Remove this case from the collection?">
<button type="submit" class="btn btn-outline-danger btn-sm case-remove" title="Remove this case from the collection"> <button type="submit" class="btn btn-outline-danger btn-sm case-remove" title="Remove this case from the collection">
<i class="bi bi-trash"></i> <i class="bi bi-trash"></i>
</button> </button>
</form> </form>
{% endif %} {% endif %}