improve collection overview page
This commit is contained in:
@@ -104,6 +104,15 @@
|
||||
|
||||
</select>
|
||||
</span>
|
||||
<span>
|
||||
Shorts Exams<br />
|
||||
<select id="shorts-exams" multiple="multiple">
|
||||
{% for name, id in shorts_exams %}
|
||||
<option value="{{id}}">{{name}}</option>
|
||||
{% endfor %}
|
||||
|
||||
</select>
|
||||
</span>
|
||||
<span>
|
||||
CaseCollection Exams<br />
|
||||
<select id="casecollection-exams" multiple="multiple">
|
||||
@@ -213,6 +222,7 @@
|
||||
sba_exams: JSON.stringify($("#sbas-exams").val()),
|
||||
longs_exams: JSON.stringify($("#longs-exams").val()),
|
||||
anatomy_exams: JSON.stringify($("#anatomy-exams").val()),
|
||||
shorts_exams: JSON.stringify($("#shorts-exams").val()),
|
||||
casecollection_exams: JSON.stringify($("#casecollection-exams").val()),
|
||||
cid_groups: JSON.stringify($("#cid-groups").val()),
|
||||
delete: false,
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
{% load partials %}
|
||||
|
||||
{% partialdef publish-results %}
|
||||
<div id="publish-results-status">
|
||||
Publish results: <span>{{collection.publish_results}}</span>
|
||||
<button
|
||||
hx-post="{% url 'atlas:exam_toggle_results_published' collection.pk %}"
|
||||
hx-swap="outerHTML"
|
||||
hx-target="#publish-results-status"
|
||||
class="btn btn-sm btn-outline-primary reduce-opacity"
|
||||
>
|
||||
{% if collection.publish_results %}Unpublish Results{% else %}Publish Results{% endif %}
|
||||
</button>
|
||||
</div>
|
||||
{% endpartialdef publish-results %}
|
||||
|
||||
|
||||
{% partialdef exam-active %}
|
||||
<div id="exam-active-status">
|
||||
Exam active: <span>{{collection.active}}</span>
|
||||
<button
|
||||
hx-post="{% url 'atlas:exam_toggle_active' collection.pk %}"
|
||||
hx-swap="outerHTML"
|
||||
hx-target="#exam-active-status"
|
||||
class="btn btn-sm btn-outline-primary reduce-opacity"
|
||||
>
|
||||
{% if collection.active %}Deactivate Exam{% else %}Activate Exam{% endif %}
|
||||
</button>
|
||||
</div>
|
||||
{% endpartialdef exam-active %}
|
||||
Reference in New Issue
Block a user