From 6297836867aa3dfc6c5a5d0a761ade0f94ca50b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=A4ttasch?= <benjamin.haettasch@fachschaft.informatik.tu-darmstadt.de> Date: Wed, 20 May 2020 23:18:46 +0200 Subject: [PATCH] Show info about requirements on event status page --- AKModel/locale/de_DE/LC_MESSAGES/django.po | 12 ++++++++++-- AKModel/templates/admin/AKModel/status.html | 17 +++++++++++++++++ locale/de_DE/LC_MESSAGES/django.po | 6 +++--- 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/AKModel/locale/de_DE/LC_MESSAGES/django.po b/AKModel/locale/de_DE/LC_MESSAGES/django.po index 4aabb181..427c2e7a 100644 --- a/AKModel/locale/de_DE/LC_MESSAGES/django.po +++ b/AKModel/locale/de_DE/LC_MESSAGES/django.po @@ -2,7 +2,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-05-19 20:46+0000\n" +"POT-Creation-Date: 2020-05-20 21:15+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -374,7 +374,7 @@ msgstr "AK Präsentieren" msgid "Present results of this AK" msgstr "Die Ergebnisse dieses AKs vorstellen" -#: AKModel/models.py:211 +#: AKModel/models.py:211 AKModel/templates/admin/AKModel/status.html:74 msgid "Requirements" msgstr "Anforderungen" @@ -561,6 +561,14 @@ msgstr "Slots" msgid "Unscheduled Slots" msgstr "Ungeplante Slots" +#: AKModel/templates/admin/AKModel/status.html:76 +msgid "No requirements yet" +msgstr "Bisher keine Anforderungen" + +#: AKModel/templates/admin/AKModel/status.html:89 +msgid "Add Requirement" +msgstr "Anforderungen hinzufügen" + #: AKModel/templates/admin/ak_index.html:7 msgid "Active Events" msgstr "Aktive Events" diff --git a/AKModel/templates/admin/AKModel/status.html b/AKModel/templates/admin/AKModel/status.html index 043eb859..eb4e4a62 100644 --- a/AKModel/templates/admin/AKModel/status.html +++ b/AKModel/templates/admin/AKModel/status.html @@ -71,5 +71,22 @@ </table> {% endif %} + <h3 class="block-header">{% trans "Requirements" %}</h3> + {% if event.akrequirement_set.count == 0 %} + <p class="text-danger">{% trans "No requirements yet" %}</p> + {% else %} + <p> + {{ event.akrequirement_set.count }}: + {% for requirement in event.akrequirement_set.all %} + {% if forloop.counter0 > 0 %} + · + {% endif %} + <a href="{% url 'admin:AKModel_akrequirement_change' requirement.pk %}">{{ requirement }}</a> + ({{ requirement.ak_set.count }}) + {% endfor %} + </p> + {% endif %} + <a class="btn btn-success" href="{% url 'admin:AKModel_akrequirement_add' %}">{% trans "Add Requirement" %}</a> + {% endtimezone %} {% endblock %} diff --git a/locale/de_DE/LC_MESSAGES/django.po b/locale/de_DE/LC_MESSAGES/django.po index 9c902594..cf47a27b 100644 --- a/locale/de_DE/LC_MESSAGES/django.po +++ b/locale/de_DE/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-05-19 21:50+0000\n" +"POT-Creation-Date: 2020-05-20 21:15+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -46,12 +46,12 @@ msgstr "Anzahl" msgid "Event Status" msgstr "Event-Status" -#: templates/base.html:28 +#: templates/base.html:29 msgid "" "Are you sure you want to change the language now? This will clear the form!" msgstr "Wirklich jetzt die Sprache ändern? Das wird das Formular zurücksetzen!" -#: templates/base.html:97 +#: templates/base.html:99 msgid "Impress" msgstr "Impressum" -- GitLab