feat: Update user messages inbox and collection user messages with enhanced acknowledgment statistics and navigation links
This commit is contained in:
@@ -45,6 +45,17 @@
|
||||
<span class="badge bg-danger">{{ row.stats.outstanding_total_count }} outstanding</span>
|
||||
</div>
|
||||
<div class="card-body pt-0">
|
||||
<div class="d-flex flex-wrap gap-2 mt-2 mb-2">
|
||||
<a class="btn btn-sm btn-outline-secondary" href="{% url 'atlas:collection_detail' collection.id %}">
|
||||
Collection
|
||||
</a>
|
||||
<a class="btn btn-sm btn-outline-secondary" href="{% url 'atlas:collection_case_view' pk=collection.id case_number=row.casedetail.sort_order %}">
|
||||
Case In Collection
|
||||
</a>
|
||||
<a class="btn btn-sm btn-outline-primary" href="{% if target_user %}{% url 'atlas:collection_history_user' collection.id target_user.id %}{% else %}{% url 'atlas:collection_history_ciduser' collection.id target_cid %}{% endif %}#case-history-{{ row.casedetail.case.id }}">
|
||||
User Answer In Context
|
||||
</a>
|
||||
</div>
|
||||
<div hx-get="{{ row.thread_url }}{% if row.cid %}?cid={{ row.cid }}{% endif %}"
|
||||
hx-trigger="load"
|
||||
hx-target="this"
|
||||
@@ -78,6 +89,17 @@
|
||||
</h2>
|
||||
<div id="history-collapse-{{ row.casedetail.case.id }}" class="accordion-collapse collapse" aria-labelledby="history-heading-{{ row.casedetail.case.id }}" data-bs-parent="#userMessageHistoryAccordion">
|
||||
<div class="accordion-body pt-0">
|
||||
<div class="d-flex flex-wrap gap-2 mt-2 mb-2">
|
||||
<a class="btn btn-sm btn-outline-secondary" href="{% url 'atlas:collection_detail' collection.id %}">
|
||||
Collection
|
||||
</a>
|
||||
<a class="btn btn-sm btn-outline-secondary" href="{% url 'atlas:collection_case_view' pk=collection.id case_number=row.casedetail.sort_order %}">
|
||||
Case In Collection
|
||||
</a>
|
||||
<a class="btn btn-sm btn-outline-primary" href="{% if target_user %}{% url 'atlas:collection_history_user' collection.id target_user.id %}{% else %}{% url 'atlas:collection_history_ciduser' collection.id target_cid %}{% endif %}#case-history-{{ row.casedetail.case.id }}">
|
||||
User Answer In Context
|
||||
</a>
|
||||
</div>
|
||||
<div hx-get="{{ row.thread_url }}{% if row.cid %}?cid={{ row.cid }}{% endif %}"
|
||||
hx-trigger="revealed once"
|
||||
hx-target="this"
|
||||
|
||||
@@ -9,7 +9,13 @@
|
||||
<div class="card border-secondary" style="min-width: 320px;">
|
||||
<div class="card-body py-2 px-3">
|
||||
<div class="small text-muted">Pending acknowledgements</div>
|
||||
<div class="fw-semibold {% if total_outstanding %}text-danger{% endif %}">
|
||||
<div class="fw-semibold {% if total_needs_your_ack %}text-danger{% endif %}">
|
||||
{{ total_needs_your_ack }} need your acknowledgement
|
||||
</div>
|
||||
<div class="small mt-1 {% if total_waiting_on_other %}text-warning-emphasis{% else %}text-muted{% endif %}">
|
||||
{{ total_waiting_on_other }} waiting on another user
|
||||
</div>
|
||||
<div class="small mt-1 text-muted">
|
||||
{{ total_outstanding }} unacknowledged message{{ total_outstanding|pluralize }}
|
||||
</div>
|
||||
<div class="mt-2">
|
||||
@@ -38,11 +44,13 @@
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="d-flex flex-wrap gap-2 align-items-center">
|
||||
{% if row.outstanding_count %}
|
||||
<span class="badge bg-danger">{{ row.outstanding_count }} unacknowledged</span>
|
||||
{% else %}
|
||||
<span class="badge bg-secondary">No outstanding</span>
|
||||
<span class="badge {% if row.needs_your_ack_count %}bg-danger{% else %}bg-secondary{% endif %}">
|
||||
{{ row.needs_your_ack_count }} need your ack
|
||||
</span>
|
||||
{% if row.waiting_on_other_count %}
|
||||
<span class="badge text-bg-warning">{{ row.waiting_on_other_count }} waiting on other</span>
|
||||
{% endif %}
|
||||
<span class="badge bg-dark-subtle text-dark-emphasis">{{ row.outstanding_count }} total unacknowledged</span>
|
||||
<a class="btn btn-sm btn-outline-secondary" href="{{ row.detail_url }}">Open user message page</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -59,7 +67,13 @@
|
||||
{% if row.collection.show_title_post %}
|
||||
<span class="text-muted">{{ case_row.casedetail.case.title|default:case_row.casedetail.case.pk|truncatechars:90 }}</span>
|
||||
{% endif %}
|
||||
<span class="badge bg-danger">{{ case_row.stats.outstanding_total_count }} unacknowledged</span>
|
||||
<span class="badge {% if case_row.stats.needs_your_ack_count %}bg-danger{% else %}bg-secondary{% endif %}">
|
||||
{{ case_row.stats.needs_your_ack_count }} need your ack
|
||||
</span>
|
||||
{% if case_row.stats.waiting_on_other_count %}
|
||||
<span class="badge text-bg-warning">{{ case_row.stats.waiting_on_other_count }} waiting on other</span>
|
||||
{% endif %}
|
||||
<span class="badge bg-dark-subtle text-dark-emphasis">{{ case_row.stats.outstanding_total_count }} total</span>
|
||||
</summary>
|
||||
{% if row.viewer_role == 'moderator' %}
|
||||
<div class="d-flex flex-wrap gap-2 mt-2">
|
||||
@@ -114,6 +128,9 @@
|
||||
: {{ case_row.casedetail.case.title|default:case_row.casedetail.case.pk|truncatechars:90 }}
|
||||
{% endif %}
|
||||
<span class="badge bg-secondary ms-2">{{ case_row.stats.message_count }} messages</span>
|
||||
{% if case_row.stats.outstanding_total_count %}
|
||||
<span class="badge bg-dark-subtle text-dark-emphasis ms-1">{{ case_row.stats.outstanding_total_count }} unacknowledged</span>
|
||||
{% endif %}
|
||||
</button>
|
||||
</h2>
|
||||
<div id="history-collapse-{{ row.attempt.id }}-{{ case_row.casedetail.case.id }}" class="accordion-collapse collapse" aria-labelledby="history-heading-{{ row.attempt.id }}-{{ case_row.casedetail.case.id }}" data-bs-parent="#history-{{ row.attempt.id }}">
|
||||
|
||||
Reference in New Issue
Block a user