From b053f2c305a5c18dfda98e5bbb0b356e58a277cf Mon Sep 17 00:00:00 2001 From: Philipp Spitzer Date: Sat, 30 Jul 2022 21:18:44 +0200 Subject: [PATCH] Add days of night light to sledrun description. --- wrpylib/templates/sledrun_wikitext.txt | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) 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 -%} -- 2.39.5