Refactor exam overview layout to enhance responsiveness and integrate action buttons for improved user interaction
This commit is contained in:
@@ -1,15 +1,14 @@
|
||||
<br/>
|
||||
{% if can_edit %}
|
||||
<a href="{% url exam.get_app_name|add:':exam_overview' exam.id %}" title="View the exam">View</a>
|
||||
\ <a href="{% url exam.get_app_name|add:':exam_update' exam.id %}" title="Edit the Exam">Edit</a>
|
||||
\ <a href="{% url exam.get_app_name|add:':exam_delete' exam.id %}" title="Delete the Exam">Delete</a>
|
||||
\ <a href="{% url exam.get_app_name|add:':exam_clone' exam.id %}" title="Clone the Exam">Clone</a>
|
||||
\ <a href="{% url exam.get_app_name|add:':exam_authors' exam.id %}" title="Edit Exam Authors">Authors</a>
|
||||
\ <a href="{% url exam.get_app_name|add:':exam_markers' exam.id %}" title="Edit Exam Markers">Markers</a>
|
||||
{% endif %}
|
||||
{% if can_edit and request.user.is_superuser %}
|
||||
\
|
||||
{% endif %}
|
||||
{% if request.user.is_superuser %}
|
||||
<a href="{% url 'admin:'|add:exam.get_app_name|add:'_exam_change' exam.id %}" title="Edit the Exam using the admin interface">Admin Edit</a>
|
||||
{% endif %}
|
||||
<div class="btn-group mt-3 mt-md-0" role="group" aria-label="Actions">
|
||||
{% if can_edit %}
|
||||
<a class="btn btn-sm btn-outline-primary" href="{% url exam.get_app_name|add:':exam_overview' exam.id %}">View</a>
|
||||
<a class="btn btn-sm btn-outline-primary" href="{% url exam.get_app_name|add:':exam_update' exam.id %}">Edit</a>
|
||||
<a class="btn btn-sm btn-outline-secondary" href="{% url exam.get_app_name|add:':exam_clone' exam.id %}">Clone</a>
|
||||
<a class="btn btn-sm btn-outline-danger" href="{% url exam.get_app_name|add:':exam_delete' exam.id %}">Delete</a>
|
||||
<a class="btn btn-sm btn-outline-secondary" href="{% url exam.get_app_name|add:':exam_authors' exam.id %}">Authors</a>
|
||||
<a class="btn btn-sm btn-outline-secondary" href="{% url exam.get_app_name|add:':exam_markers' exam.id %}">Markers</a>
|
||||
{% endif %}
|
||||
|
||||
{% if request.user.is_superuser %}
|
||||
<a class="btn btn-sm btn-outline-light" href="{% url 'admin:'|add:exam.get_app_name|add:'_exam_change' exam.id %}">Admin</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
@@ -1,10 +1,16 @@
|
||||
{% include "generic/exam_link_headers.html" %}
|
||||
|
||||
<div class="container-fluid mb-3">
|
||||
<div class="row align-items-start">
|
||||
<div class="col-12 col-md-8">
|
||||
{# Responsive: title stacks above metadata on small screens; use h4 for compactness #}
|
||||
<h1 class="h4 mb-1">Exam: {{ exam }}</h1>
|
||||
{# Responsive: title to left, action buttons (include) to the right on md+ #}
|
||||
<div class="d-flex justify-content-between align-items-start flex-column flex-md-row mb-1">
|
||||
<div>
|
||||
<h1 class="h4 mb-1">Exam: {{ exam }}</h1>
|
||||
</div>
|
||||
<div class="mt-2 mt-md-0">
|
||||
{% include "generic/exam_link_headers.html" %}
|
||||
</div>
|
||||
</div>
|
||||
{% include 'exam_notes.html' %}
|
||||
|
||||
{% if exam.examcollection %}
|
||||
|
||||
Reference in New Issue
Block a user