feat: Add moderator action buttons in user messages inbox for enhanced navigation
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
|
||||
<div class="list-group mb-4">
|
||||
{% for row in history_rows %}
|
||||
<div class="list-group-item {% if not row.user_answer %}bg-danger-subtle border-danger-subtle{% endif %}">
|
||||
<div id="case-history-{{ row.casedetail.case.id }}" class="list-group-item {% if not row.user_answer %}bg-danger-subtle border-danger-subtle{% endif %}">
|
||||
<div class="d-flex flex-wrap justify-content-between align-items-start gap-2 mb-2">
|
||||
<div>
|
||||
<div class="fw-semibold">
|
||||
|
||||
@@ -61,6 +61,22 @@
|
||||
{% endif %}
|
||||
<span class="badge bg-danger">{{ case_row.stats.outstanding_total_count }} unacknowledged</span>
|
||||
</summary>
|
||||
{% if row.viewer_role == 'moderator' %}
|
||||
<div class="d-flex flex-wrap gap-2 mt-2">
|
||||
<a class="btn btn-sm btn-outline-secondary"
|
||||
href="{% url 'atlas:collection_detail' row.collection.id %}">
|
||||
Collection
|
||||
</a>
|
||||
<a class="btn btn-sm btn-outline-secondary"
|
||||
href="{% url 'atlas:collection_case_view' pk=row.collection.id case_number=case_row.casedetail.sort_order %}">
|
||||
Case In Collection
|
||||
</a>
|
||||
<a class="btn btn-sm btn-outline-primary"
|
||||
href="{% if row.attempt.user_user_id %}{% url 'atlas:collection_history_user' row.collection.id row.attempt.user_user_id %}{% else %}{% url 'atlas:collection_history_ciduser' row.collection.id row.attempt.cid_user.cid %}{% endif %}#case-history-{{ case_row.casedetail.case.id }}">
|
||||
User Answer In Context
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="mt-2"
|
||||
hx-get="{{ case_row.thread_url }}{% if case_row.cid %}?cid={{ case_row.cid }}{% endif %}"
|
||||
hx-trigger="load"
|
||||
@@ -91,6 +107,22 @@
|
||||
</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 }}">
|
||||
<div class="accordion-body pt-0">
|
||||
{% if row.viewer_role == 'moderator' %}
|
||||
<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' row.collection.id %}">
|
||||
Collection
|
||||
</a>
|
||||
<a class="btn btn-sm btn-outline-secondary"
|
||||
href="{% url 'atlas:collection_case_view' pk=row.collection.id case_number=case_row.casedetail.sort_order %}">
|
||||
Case In Collection
|
||||
</a>
|
||||
<a class="btn btn-sm btn-outline-primary"
|
||||
href="{% if row.attempt.user_user_id %}{% url 'atlas:collection_history_user' row.collection.id row.attempt.user_user_id %}{% else %}{% url 'atlas:collection_history_ciduser' row.collection.id row.attempt.cid_user.cid %}{% endif %}#case-history-{{ case_row.casedetail.case.id }}">
|
||||
User Answer In Context
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div hx-get="{{ case_row.thread_url }}{% if case_row.cid %}?cid={{ case_row.cid }}{% endif %}"
|
||||
hx-trigger="revealed once"
|
||||
hx-target="this"
|
||||
|
||||
Reference in New Issue
Block a user