fix missing time info and variable barcode length

pull/174/head
mariusrklein 4 months ago
parent c3527187c1
commit e3722f66d4

@ -21,8 +21,7 @@
% HEADLINE % HEADLINE
{\noindent\Large{Gruppenliste {{ group.name }} }}\\[1mm] {\noindent\Large{Gruppenliste {{ group.name }} }}\\[1mm]
\noindent {{ weekdays|index:group.weekday|esc_all }}, {{ group.start_time }} - {{ group.end_time }} Uhr\\ {% if group.has_time_info %} \noindent {{ weekdays|index:group.weekday|esc_all }}, {{ group.start_time }} - {{ group.end_time }} Uhr\\ {% endif %}
\noindent {{ header_text }} \noindent {{ header_text }}
\begin{table}[H] \begin{table}[H]
\centering \centering
@ -35,17 +34,25 @@
{% for j in member_range %} {% for j in member_range %}
{% with m=group.sorted_members|index:j %} {% with m=group.sorted_members|index:j %}
{% with codelength=m.ticket_tag|length %}
\midrule \midrule
\begin{tabular}{@{}l} \begin{tabular}{@{}l}
{% if m.ticket_tag|length > 2 %}\barcode{{ m.ticket_tag }}{% else %}\rule{0pt}{5mm}{% endif %} {% if codelength > 2 %}
\barcode[
X=\dimexpr 3.5mm / \numexpr {{ codelength }} \relax \relax
]{{ m.ticket_tag }}
{% else %}
\rule{0pt}{5mm}
{% endif %}
\vspace{-0.8ex} \\ \vspace{-0.8ex} \\
{\small {{ j|plus:1 }} {% if m in group.leiters.all %}\textbf{JL}{% endif %} {\small {{ j|plus:1 }} {% if m in group.leiters.all %}\textbf{JL}{% endif %}
{{ m.name|esc_all }} {% if m.ticket_tag|length > 2 %} - {{ m.ticket_tag }}{% endif %} {{ m.name|esc_all }} {% if codelength > 2 %} - {{ m.ticket_tag }}{% endif %}
\vspace{-3ex} } \vspace{-3ex} }
\end{tabular} \end{tabular}
{% for i in week_range %} & {% endfor %}\\ {% for i in week_range %} & {% endfor %}\\
{% endwith %} {% endwith %}
{% endwith %}
{% endfor %} {% endfor %}
\bottomrule \bottomrule

Loading…
Cancel
Save