Add source display to question review and improve wording in review start template

This commit is contained in:
Ross
2025-10-27 12:02:56 +00:00
parent 6e8c86ab10
commit 473efbc8f4
2 changed files with 23 additions and 18 deletions
@@ -104,12 +104,17 @@
{% endif %}
</div>
{% endif %}
</div>
{# Generic feedback text if present #}
{% if question.feedback %}
<div class="mt-2"><strong>Feedback:</strong> {{ question.feedback|safe }}</div>
{% endif %}
{% if question.source %}
<div class="mt-2"><strong>Source:</strong> {{ question.source|safe }}</div>
{% endif %}
</div>
{% comment %} <span class="btn btn-sm btn-outline-success" data-bs-toggle="modal" data-bs-target="#reviewModal" hx-get="{% url 'sbas:question_set_review' question.pk %}?edit=1&new=1" hx-target="#review-form" hx-swap="innerHTML" hx-trigger="load">Add Review</button> {% endcomment %}
+18 -18
View File
@@ -6,7 +6,7 @@
<h2>Review Questions</h2>
<p>Filter questions to review. Choose a category and/or a review status, then click Start to open the first matching question.</p>
<p>Filter questions to review. Choose a category and/or a review status, then click Start to open the first matching question that needs reviewing.</p>
<form method="post" action="{% url 'sbas:question_review_next' %}">
{% csrf_token %}
@@ -35,28 +35,28 @@
{% endfor %}
</select>
</div>
<div>
<p>You can also view the list of questions matching the filters below.</p>
<button id="view-list-btn" type="button" class="btn btn-outline-primary">View list</button>
</div>
<div>
<p>You can also view the list of questions matching the filters below.</p>
<button id="view-list-btn" type="button" class="btn btn-outline-primary">View list</button>
</div>
</form>
<script>
// When View list is clicked, read the values from the main filter form and navigate
(function(){
const btn = document.getElementById('view-list-btn');
btn.addEventListener('click', function(){
const base = "{% url 'sbas:question_review_list' %}";
const params = new URLSearchParams();
const categoryEl = document.getElementById('id_category');
const statusEl = document.getElementById('id_status');
if (categoryEl && categoryEl.value) params.set('category', categoryEl.value);
if (statusEl && statusEl.value) params.set('status', statusEl.value);
const url = base + (params.toString() ? ('?' + params.toString()) : '');
window.location.href = url;
});
})();
(function(){
const btn = document.getElementById('view-list-btn');
btn.addEventListener('click', function(){
const base = "{% url 'sbas:question_review_list' %}";
const params = new URLSearchParams();
const categoryEl = document.getElementById('id_category');
const statusEl = document.getElementById('id_status');
if (categoryEl && categoryEl.value) params.set('category', categoryEl.value);
if (statusEl && statusEl.value) params.set('status', statusEl.value);
const url = base + (params.toString() ? ('?' + params.toString()) : '');
window.location.href = url;
});
})();
</script>
{% endblock %}