From 9af297bfa6d70e5a68e06b636e3fae6ca97e3d65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=A4ttasch?= <benjamin.haettasch@fachschaft.informatik.tu-darmstadt.de> Date: Sat, 21 May 2022 18:42:26 +0200 Subject: [PATCH] Introduce note space parameter for slide export One can now specify whether there should be symbols for owner and duration of a wish such that the person leading the plenum can write one the slides if some is interested in becoming owner of the AK or not. The default link on the status page hides those symbols. --- AKModel/templates/admin/AKModel/export/slides.tex | 2 ++ AKModel/templates/admin/AKModel/status.html | 2 +- AKModel/views.py | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/AKModel/templates/admin/AKModel/export/slides.tex b/AKModel/templates/admin/AKModel/export/slides.tex index a30f8d8b..a74b7536 100644 --- a/AKModel/templates/admin/AKModel/export/slides.tex +++ b/AKModel/templates/admin/AKModel/export/slides.tex @@ -86,9 +86,11 @@ \faFilter~ {{ ak.category.name | latex_escape }} + {% if space_for_notes_in_wishes %} \faUser~ \faClock~ + {% endif %} {{ ak.description | truncatechars(280) | latex_escape }} diff --git a/AKModel/templates/admin/AKModel/status.html b/AKModel/templates/admin/AKModel/status.html index 2720ea86..1af396e8 100644 --- a/AKModel/templates/admin/AKModel/status.html +++ b/AKModel/templates/admin/AKModel/status.html @@ -85,7 +85,7 @@ <a class="btn btn-success" href="{% url 'admin:ak_wiki_export' slug=event.slug %}">{% trans "Export AKs for Wiki" %}</a> <a class="btn btn-success" - href="{% url 'admin:ak_slide_export' event_slug=event.slug %}?num_next=3">{% trans "Export AK Slides" %}</a> + href="{% url 'admin:ak_slide_export' event_slug=event.slug %}?num_next=3&wish_notes=False">{% trans "Export AK Slides" %}</a> <a class="btn btn-success" href="{% url 'admin:ak_slide_export' event_slug=event.slug %}?num_next=3&presentation_mode">{% trans "Export AK Slides (Presentation AKs only)" %}</a> {% endif %} diff --git a/AKModel/views.py b/AKModel/views.py index 539c4f43..2729bdb6 100644 --- a/AKModel/views.py +++ b/AKModel/views.py @@ -312,6 +312,7 @@ def export_slides(request, event_slug): NEXT_AK_LIST_LENGTH = int(request.GET["num_next"]) if "num_next" in request.GET else 3 RESULT_PRESENTATION_MODE = True if "presentation_mode" in request.GET else False + SPACE_FOR_NOTES_IN_WISHES = request.GET["wish_notes"] == "True" if "wish_notes" in request.GET else False translations = { 'symbols': _("Symbols"), @@ -337,6 +338,7 @@ def export_slides(request, event_slug): "wishes": build_ak_list_with_next_aks(ak_wishes), "translations": translations, "result_presentation_mode": RESULT_PRESENTATION_MODE, + "space_for_notes_in_wishes": SPACE_FOR_NOTES_IN_WISHES, } return render_to_pdf(request, template_name, context, filename='slides.pdf') -- GitLab