Skip to content
Snippets Groups Projects
Commit f469c2b2 authored by Benjamin Hättasch's avatar Benjamin Hättasch
Browse files

Introduce result presentation mode for slides and allow to specify mode and...

Introduce result presentation mode for slides and allow to specify mode and num of next AKs via GET params

The export now allows to optional params, ?presentation_mode (without args) and ?num_next=<int> (default 3)
parent 58301524
No related branches found
No related tags found
1 merge request!87AK Slides
Pipeline #22368 passed
......@@ -69,36 +69,37 @@
{% endfor %}
{% if not result_presentation_mode %}
\section{ {{- translations.wishes -}} }
\section{ {{- translations.wishes -}} }
{% for ak, next_aks in wishes %}
{% for ak, next_aks in wishes %}
%\setbeamertemplate{frame footer}{}
%\setbeamertemplate{frame footer}{}
\begin{frame}[shrink=15]
\frametitle{ {{- ak.name | latex_escape_utf8 -}} }
\begin{frame}[shrink=15]
\frametitle{ {{- ak.name | latex_escape_utf8 -}} }
\vspace{1em}
\vspace{1em}
\faFilter~ {{ ak.category.name | latex_escape_utf8 }}
\faFilter~ {{ ak.category.name | latex_escape_utf8 }}
\faUser~
\faUser~
\faClock~
\faClock~
{{ ak.description | truncatechars(400) | latex_escape_utf8 }}
{{ ak.description | truncatechars(400) | latex_escape_utf8 }}
\vspace{2em}
\vspace{2em}
\begin{scriptsize}
{% for n_ak in next_aks %}
{% if n_ak %}\hfill \faAngleDoubleRight~ {{- n_ak.name | latex_escape_utf8 -}}{% endif %}
{% endfor %}
\end{scriptsize}
\begin{scriptsize}
{% for n_ak in next_aks %}
{% if n_ak %}\hfill \faAngleDoubleRight~ {{- n_ak.name | latex_escape_utf8 -}}{% endif %}
{% endfor %}
\end{scriptsize}
\end{frame}
{% endfor %}
\end{frame}
{% endfor %}
{% endif %}
\end{document}
......@@ -298,7 +298,8 @@ def export_slides(request, event_slug):
event = get_object_or_404(Event, slug=event_slug)
NEXT_AK_LIST_LENGTH = 4
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
translations = {
'symbols': _("Symbols"),
......@@ -322,7 +323,8 @@ def export_slides(request, event_slug):
if ak.wish:
ak_wishes.append(ak)
else:
ak_list.append(ak)
if not RESULT_PRESENTATION_MODE or ak.present:
ak_list.append(ak)
categories_with_aks.append((category, build_ak_list_with_next_aks(ak_list)))
context = {
......@@ -331,6 +333,7 @@ def export_slides(request, event_slug):
'subtitle': _("AKs"),
"wishes": build_ak_list_with_next_aks(ak_wishes),
"translations": translations,
"result_presentation_mode": RESULT_PRESENTATION_MODE,
}
return render_to_pdf(request, template_name, context, filename='slides.pdf')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment