]> ToastFreeware Gitweb - philipp/winterrodeln/wrpylib.git/commitdiff
Add days of night light to sledrun description.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Sat, 30 Jul 2022 19:18:44 +0000 (21:18 +0200)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Sat, 30 Jul 2022 19:18:44 +0000 (21:18 +0200)
wrpylib/templates/sledrun_wikitext.txt

index 05dd48fe4de66e28bd6acbfe19c28199006033bf..29c9c5d6210eff75458464c9ebd666fb53e8d9b7 100644 (file)
   {%- else %}
   {%- if walkup_possible is false %} (ein Aufstieg zu Fuß ist nicht möglich){% endif %}
   {%- endif %}
   {%- else %}
   {%- if walkup_possible is false %} (ein Aufstieg zu Fuß ist nicht möglich){% endif %}
   {%- endif %}
-* '''Beleuchtung''': {{ nightlight_description | default( nightlight_possible | default("''Unbekannt''") ) | trim }}
+* '''Beleuchtung''': {% if nightlight_description -%}
+  {{ nightlight_description }}
+  {%- else %}
+  {%- if nightlight_possible -%}
+  {{ nightlight_possible }}
+  {%- if nightlight_weekdays %} (
+  {%- if nightlight_weekdays|length == 7 -%}
+  täglich
+  {%- else -%}
+  {{ ', '.join(nightlight_weekdays) }}
+  {%- endif -%}
+  ){% endif %}
+  {%- else -%}
+  ''Unbekannt''
+  {%- endif %}
+  {%- endif %}
 * '''Rodelverleih''': {% if sled_rental_description -%}
 {{ sled_rental_description | trim }}
 {%- else -%}
 * '''Rodelverleih''': {% if sled_rental_description -%}
 {{ sled_rental_description | trim }}
 {%- else -%}