From 7cd69baa77613af83bcd09529a9c8e80f7e5a7ef Mon Sep 17 00:00:00 2001 From: Philipp Spitzer Date: Mon, 11 Jul 2022 18:24:04 +0200 Subject: [PATCH] Use a default description if no public transport is possible. --- wrpylib/templates/sledrun_wikitext.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wrpylib/templates/sledrun_wikitext.txt b/wrpylib/templates/sledrun_wikitext.txt index ca88e96..c27faf3 100644 --- a/wrpylib/templates/sledrun_wikitext.txt +++ b/wrpylib/templates/sledrun_wikitext.txt @@ -114,8 +114,12 @@ {% if public_transport_description -%} {{ public_transport_description | trim }} {%- else -%} +{% if public_transport == "Nein" -%} +Leider ist keine Anreise mit öffentlichen Verkehrsmitteln möglich. +{%- else -%} ''Hier wird die Anreise mit öffentlichen Verkehrsmitteln beschrieben.'' {%- endif %} +{%- endif %} {% for pt_stop in public_transport_stops -%} * {{ h.list_template('Haltestelle', [pt_stop.municipality, pt_stop.name_local, h.json_pos_ele_position(pt_stop.get('position', {})), h.json_pos_ele_elevation(pt_stop.get('position', {}))]) }} -- 2.39.5