]> ToastFreeware Gitweb - philipp/winterrodeln/wrpylib.git/commitdiff
Create "Buttonleiste" with key_value_template.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Mon, 6 Jun 2022 15:37:59 +0000 (17:37 +0200)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Mon, 6 Jun 2022 20:21:13 +0000 (22:21 +0200)
wrpylib/templates/sledrun_wikitext.txt

index 110fb3d3e53c72eeb12b437cf5718824fb24b92c..13febab37e89c5ac15f8feba6d1f8dccee987495 100644 (file)
 ** {{ weblink(info) }}
 {%- endfor %}
 
-{% raw %}{{Buttonleiste{% endraw -%}
-|Bericht={{ allow_reports | default(true) | german_bool }}
-{%- if forum_id %}|ForumId={{ forum_id }}{% endif -%}
-{% if impressions_title %}|Impressionen={{ impressions_title }}{% endif -%}
-{%- if position %}|Wetter=Ja{% endif -%}
-{%- if videos %}|Video={{ videos[0].url }}{% endif -%}
-|Korrektur=Seite{% if correction_email %}|Korrektur_To={{ correction_email }}{% endif -%}
-{% if freizeitticket_tyrol %}|Freizeitticket=Ja{% endif -%}
-{% if regio_card_tyrol %}|Regiocard=Ja{% endif -%}}}
+{{ h.key_value_template('Buttonleiste', {
+    'Bericht': allow_reports|german_bool,
+    'ForumId': forum_id,
+    'Impressionen': impressions_title,
+    'Wetter': 'Ja' if position else '',
+    'video': videos[0].url if videos and videos|length > 0 else '',
+    'Korrektur': 'Seite',
+    'Korrektur_To': correction_email,
+    'Freizeitticket': 'Ja' if freizeitticket_tyrol else '',
+    'Regiocard': 'Ja' if regio_card_tyrol else '',
+}) }}
 {% raw %}{{Clear}}{% endraw %}