.
This commit is contained in:
@@ -18,7 +18,7 @@ _="on click hide <li.inactive-False/> then show <li.inactive-True/> then set #co
|
||||
<li class="inactive-{{entry.inactive}}"><a href='{{entry.get_absolute_url}}'>{{entry.exam_code}} / {{entry.exam_name}}</a></li>
|
||||
|
||||
{% endfor %}
|
||||
<li>
|
||||
</ul>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
{% extends 'oef/base.html' %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h2>Entries</h2>
|
||||
Count: <span id="count">{{ entries|length }}</span>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Exam Code</th>
|
||||
<th>Exam Name</th>
|
||||
<th>Current Format</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for entry in entries %}
|
||||
<tr><td><a href='{{entry.get_absolute_url}}'>{{entry.exam_code}}</a></td><td>{{entry.exam_name}}</td><td>{{entry.get_current_format}}</td></tr>
|
||||
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block css %}
|
||||
<style type="text/css">
|
||||
.inactive-True a {
|
||||
color: darkred;
|
||||
text-decoration: none;
|
||||
}
|
||||
.inactive-False a {
|
||||
text-decoration: none;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
{% block content %}
|
||||
|
||||
View <a href="{% url 'oef:entries' %}">All</a>
|
||||
View <a href="{% url 'oef:entries' %}">All</a> <a href="{% url 'oef:entries_table' %}">Export</a>
|
||||
|
||||
<div id="view-filter-options">
|
||||
<details><summary>
|
||||
|
||||
@@ -35,6 +35,9 @@ urlpatterns = [
|
||||
path(
|
||||
"entries/subspecialties", views.subspecialties, name="subspecialties"
|
||||
),
|
||||
path(
|
||||
"entries/table", views.entries_table, name="entries_table"
|
||||
),
|
||||
path(
|
||||
"entries/all", views.entries, name="entries"
|
||||
),
|
||||
|
||||
@@ -231,6 +231,9 @@ def replace_questions(request):
|
||||
else:
|
||||
return render(request, "oef/replace_questions.html", {})
|
||||
|
||||
def entries_table(request):
|
||||
entries = Entry.objects.all().order_by("exam_code")
|
||||
return render(request, "oef/entries_table.html", {"entries": entries})
|
||||
|
||||
def entries(request):
|
||||
entries = Entry.objects.all().order_by("exam_code")
|
||||
|
||||
Reference in New Issue
Block a user