fix: Update case messaging conditionals for clarity and correctness
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -138,26 +138,26 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if collection.case_query_messaging_enabled %}
|
{% if collection.case_query_messaging_enabled %}
|
||||||
<details class="mt-3" {% if row.case_review_stats.has_outstanding_any %}open{% endif %}>
|
<details class="mt-3" {% if row.case_review_stats.has_outstanding_any %}open{% endif %}>
|
||||||
<summary class="small fw-semibold d-flex flex-wrap align-items-center gap-2">
|
<summary class="small fw-semibold d-flex flex-wrap align-items-center gap-2">
|
||||||
<span>Case conversation</span>
|
<span>Case conversation</span>
|
||||||
{% if row.case_review_stats.has_outstanding_any %}
|
{% if row.case_review_stats.has_outstanding_any %}
|
||||||
<span class="badge bg-danger">{{ row.case_review_stats.outstanding_total_count }} unacknowledged message{{ row.case_review_stats.outstanding_total_count|pluralize }}</span>
|
<span class="badge bg-danger">{{ row.case_review_stats.outstanding_total_count }} unacknowledged message{{ row.case_review_stats.outstanding_total_count|pluralize }}</span>
|
||||||
{% elif row.case_review_stats.has_messages %}
|
{% elif row.case_review_stats.has_messages %}
|
||||||
<span class="badge bg-secondary">{{ row.case_review_stats.message_count }} message{{ row.case_review_stats.message_count|pluralize }}</span>
|
<span class="badge bg-secondary">{{ row.case_review_stats.message_count }} message{{ row.case_review_stats.message_count|pluralize }}</span>
|
||||||
{% else %}
|
{% else %}
|
||||||
<span class="text-muted">No messages yet</span>
|
<span class="text-muted">No messages yet</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</summary>
|
</summary>
|
||||||
|
|
||||||
<div class="mt-2"
|
<div class="mt-2"
|
||||||
hx-get="{{ row.thread_url }}{% if row.cid %}?cid={{ row.cid }}{% endif %}"
|
hx-get="{{ row.thread_url }}{% if row.cid %}?cid={{ row.cid }}{% endif %}"
|
||||||
hx-trigger="load"
|
hx-trigger="load"
|
||||||
hx-target="this"
|
hx-target="this"
|
||||||
hx-swap="innerHTML">
|
hx-swap="innerHTML">
|
||||||
<div class="small text-muted">Loading case conversation...</div>
|
<div class="small text-muted">Loading case conversation...</div>
|
||||||
</div>
|
</div>
|
||||||
</details>
|
</details>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
{% if cid_user_exam.completed %}
|
{% if cid_user_exam.completed %}
|
||||||
<div class="mt-1 small">End time: {{ cid_user_exam.end_time|default:"-" }}</div>
|
<div class="mt-1 small">End time: {{ cid_user_exam.end_time|default:"-" }}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if collection.case_query_messaging_enabled and (collection.in_review_mode or cid_user_exam.completed) %}
|
{% if collection.case_query_messaging_enabled and collection.in_review_mode or collection.case_query_messaging_enabled and cid_user_exam.completed %}
|
||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
<a class="btn btn-sm {% if total_outstanding_feedback %}btn-danger{% else %}btn-outline-secondary{% endif %}"
|
<a class="btn btn-sm {% if total_outstanding_feedback %}btn-danger{% else %}btn-outline-secondary{% endif %}"
|
||||||
href="{% if cid is not None %}{% url 'atlas:collection_feedback_overview' pk=collection.id cid=cid passcode=passcode %}{% else %}{% url 'atlas:collection_feedback_overview_user' pk=collection.id %}{% endif %}">
|
href="{% if cid is not None %}{% url 'atlas:collection_feedback_overview' pk=collection.id cid=cid passcode=passcode %}{% else %}{% url 'atlas:collection_feedback_overview_user' pk=collection.id %}{% endif %}">
|
||||||
|
|||||||
Reference in New Issue
Block a user