Update case series count and management links to use collection.pk for consistency
This commit is contained in:
@@ -13,10 +13,10 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mt-2 small text-muted">
|
<div class="mt-2 small text-muted">
|
||||||
{% if casedetail.case.series.count == 0 %}
|
{% if casedetail.series_count|default:0 == 0 %}
|
||||||
<span class="text-warning">This case has no series / stacks attached</span>
|
<span class="text-warning">This case has no series / stacks attached</span>
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ casedetail.case.series.count }} series
|
{{ casedetail.series_count }} series
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if casedetail.question_schema %}
|
{% if casedetail.question_schema %}
|
||||||
• <span class="text-success">Questions defined</span>
|
• <span class="text-success">Questions defined</span>
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
<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' casedetail.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>
|
||||||
|
|
||||||
<a class="btn btn-outline-secondary" href="{% url 'atlas:collection_case_details_legacy' casedetail.collection.pk casedetail.case.pk %}" title="Case details">
|
<a class="btn btn-outline-secondary" href="{% url 'atlas:collection_case_details_legacy' collection.pk casedetail.case.pk %}" title="Case details">
|
||||||
<i class="bi bi-info-square"></i>
|
<i class="bi bi-info-square"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
{% if collection.collection_type == "QUE" %}
|
{% if collection.collection_type == "QUE" %}
|
||||||
<a class="btn btn-outline-secondary" href='{% url "atlas:collection_case_questions_legacy" casedetail.collection.pk casedetail.case.pk %}' title="Manage questions">
|
<a class="btn btn-outline-secondary" href='{% url "atlas:collection_case_questions_legacy" collection.pk casedetail.case.pk %}' title="Manage questions">
|
||||||
{% if casedetail.question_schema %}
|
{% if casedetail.question_schema %}
|
||||||
<i class="bi bi-question-square text-success"></i>
|
<i class="bi bi-question-square text-success"></i>
|
||||||
{% else %}
|
{% else %}
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if casedetail.case.previous_case %}
|
{% if casedetail.case.previous_case %}
|
||||||
<a class="btn btn-outline-secondary" href='{% url "atlas:collection_case_priors_legacy" casedetail.collection.pk casedetail.case.pk %}' title="Manage priors">
|
<a class="btn btn-outline-secondary" href='{% url "atlas:collection_case_priors_legacy" collection.pk casedetail.case.pk %}' title="Manage priors">
|
||||||
<i class="bi bi-link-45deg"></i>
|
<i class="bi bi-link-45deg"></i>
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
{# 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 casedetail.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>
|
||||||
|
|||||||
Reference in New Issue
Block a user