Add source display to question review and improve wording in review start template
This commit is contained in:
@@ -104,12 +104,17 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{# Generic feedback text if present #}
|
{# Generic feedback text if present #}
|
||||||
{% if question.feedback %}
|
{% if question.feedback %}
|
||||||
<div class="mt-2"><strong>Feedback:</strong> {{ question.feedback|safe }}</div>
|
<div class="mt-2"><strong>Feedback:</strong> {{ question.feedback|safe }}</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if question.source %}
|
||||||
|
<div class="mt-2"><strong>Source:</strong> {{ question.source|safe }}</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</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 %}
|
{% 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 %}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<h2>Review Questions</h2>
|
<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' %}">
|
<form method="post" action="{% url 'sbas:question_review_next' %}">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
@@ -35,28 +35,28 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<p>You can also view the list of questions matching the filters below.</p>
|
<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>
|
<button id="view-list-btn" type="button" class="btn btn-outline-primary">View list</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// When View list is clicked, read the values from the main filter form and navigate
|
// When View list is clicked, read the values from the main filter form and navigate
|
||||||
(function(){
|
(function(){
|
||||||
const btn = document.getElementById('view-list-btn');
|
const btn = document.getElementById('view-list-btn');
|
||||||
btn.addEventListener('click', function(){
|
btn.addEventListener('click', function(){
|
||||||
const base = "{% url 'sbas:question_review_list' %}";
|
const base = "{% url 'sbas:question_review_list' %}";
|
||||||
const params = new URLSearchParams();
|
const params = new URLSearchParams();
|
||||||
const categoryEl = document.getElementById('id_category');
|
const categoryEl = document.getElementById('id_category');
|
||||||
const statusEl = document.getElementById('id_status');
|
const statusEl = document.getElementById('id_status');
|
||||||
if (categoryEl && categoryEl.value) params.set('category', categoryEl.value);
|
if (categoryEl && categoryEl.value) params.set('category', categoryEl.value);
|
||||||
if (statusEl && statusEl.value) params.set('status', statusEl.value);
|
if (statusEl && statusEl.value) params.set('status', statusEl.value);
|
||||||
const url = base + (params.toString() ? ('?' + params.toString()) : '');
|
const url = base + (params.toString() ? ('?' + params.toString()) : '');
|
||||||
window.location.href = url;
|
window.location.href = url;
|
||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
Reference in New Issue
Block a user