From: Philipp Spitzer Date: Sat, 30 Jul 2022 19:18:44 +0000 (+0200) Subject: Add days of night light to sledrun description. X-Git-Url: https://git.toastfreeware.priv.at/philipp/winterrodeln/wrpylib.git/commitdiff_plain/b053f2c305a5c18dfda98e5bbb0b356e58a277cf?ds=sidebyside Add days of night light to sledrun description. --- diff --git a/wrpylib/templates/sledrun_wikitext.txt b/wrpylib/templates/sledrun_wikitext.txt index 05dd48f..29c9c5d 100644 --- a/wrpylib/templates/sledrun_wikitext.txt +++ b/wrpylib/templates/sledrun_wikitext.txt @@ -32,7 +32,22 @@ {%- 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 -%}