From: Philipp Spitzer Date: Mon, 11 Jul 2022 16:24:04 +0000 (+0200) Subject: Use a default description if no public transport is possible. X-Git-Url: https://git.toastfreeware.priv.at/philipp/winterrodeln/wrpylib.git/commitdiff_plain/7cd69baa77613af83bcd09529a9c8e80f7e5a7ef Use a default description if no public transport is possible. --- 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', {}))]) }}