From ea1401beaafbcaa507bdf1f28d701fec4de80582 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Benjamin=20H=C3=A4ttasch?=
 <benjamin.haettasch@fachschaft.informatik.tu-darmstadt.de>
Date: Tue, 27 Sep 2022 17:26:34 +0200
Subject: [PATCH] Improve page for special attention requiring AKs

Show count of slots for wishes and link directly to a filtered list
---
 .../templates/admin/AKScheduling/special_attention.html      | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/AKScheduling/templates/admin/AKScheduling/special_attention.html b/AKScheduling/templates/admin/AKScheduling/special_attention.html
index a3c48d19..68cbb11e 100644
--- a/AKScheduling/templates/admin/AKScheduling/special_attention.html
+++ b/AKScheduling/templates/admin/AKScheduling/special_attention.html
@@ -27,11 +27,12 @@
 
     <h4 class="mt-4 mb-4">{% trans "AK wishes with slots" %}</h4>
     {% for ak in ak_wishes_with_slots %}
-        <a href="{% url "submit:ak_detail" event_slug=event.slug pk=ak.pk %}">{{ ak }}</a><br>
+        <a href="{% url "submit:ak_detail" event_slug=event.slug pk=ak.pk %}">{{ ak }}</a> <a href="{% url "admin:AKModel_akslot_changelist" %}?ak={{ ak.pk }}">({{ ak.akslot__count }})</a><br>
     {% empty %}
         -
     {% endfor %}
-    <a class="btn btn-warning" href="{% url "admin:cleanup-wish-slots" event_slug=event.slug %}">{% trans "Delete slots for wishes" %}</a>
+
+    <a class="btn btn-warning mt-2" href="{% url "admin:cleanup-wish-slots" event_slug=event.slug %}">{% trans "Delete slots for wishes" %}</a>
 
     <h4 class="mt-4 mb-4">{% trans "AKs without slots" %}</h4>
     {% for ak in aks_without_slots %}
-- 
GitLab