From 308543be2a5d1986f80ef7f4d5bc9cf5ed319e9d Mon Sep 17 00:00:00 2001 From: Philipp Spitzer Date: Thu, 9 Jun 2022 23:48:42 +0200 Subject: [PATCH] Details for sled rental and newline tuning for public transport. --- wrpylib/templates/sledrun_wikitext.txt | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/wrpylib/templates/sledrun_wikitext.txt b/wrpylib/templates/sledrun_wikitext.txt index 3b1e808..98f1025 100644 --- a/wrpylib/templates/sledrun_wikitext.txt +++ b/wrpylib/templates/sledrun_wikitext.txt @@ -30,7 +30,18 @@ * {{Gehzeit}} {% endraw -%} * '''Beleuchtung''': {{ nightlight_description | default( nightlight_possible | default("''Unbekannt''") ) | trim }} -* '''Rodelverleih''': {{ sled_rental_description | default( sled_rental_direct | german_bool | default("''Unbekannt''") ) | trim }} +* '''Rodelverleih''': {% if sled_rental_description -%} +{{ sled_rental_description | trim }} +{%- else -%} +{% if sled_rental -%} +{% if sled_rental|length == 0 %}Nein{% endif %} +{%- else -%} +{{ sled_rental_direct | german_bool | default("''Unbekannt''") }} +{%- endif %} +{%- endif -%} +{% for rental in sled_rental %} +** {{ rental.name }}{%if rental.note %} ({{ rental.note }}){% endif %}{% if rental.wr_page %}{{ wr_page(info) }}{% endif %} +{%- endfor %} * '''Schneelage - Auskunft''': {%- for info in info_phone %} ** {{ info.phone }} ({{ info.name }}) @@ -98,16 +109,14 @@ {%- endfor -%} {% if public_transport_lines|length + public_transport_links|length > 0 -%} * '''Fahrplan''': -{% endif -%} {% for pt_line in public_transport_lines -%} ** {% if pt_line.timetable_template is defined %}{{ h.json_template(pt_line.timetable_template) }} {%- else %}{{ pt_line.name }}{% endif %} {% endfor -%} {% for link in public_transport_links -%} ** {{ weblink(link) }} -{%- endfor %} - - +{% endfor %} +{% endif %} == Anreise mit dem Auto == {% if car_description -%} {{ car_description | trim }} -- 2.39.5