From 0189cbde934566f7693e12129abafc5f1fccd662 Mon Sep 17 00:00:00 2001 From: Philipp Spitzer Date: Sun, 12 Jun 2022 15:27:14 +0200 Subject: [PATCH] Show more info for public transport lines. --- wrpylib/templates/sledrun_wikitext.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/wrpylib/templates/sledrun_wikitext.txt b/wrpylib/templates/sledrun_wikitext.txt index b458eba..ec09d2a 100644 --- a/wrpylib/templates/sledrun_wikitext.txt +++ b/wrpylib/templates/sledrun_wikitext.txt @@ -114,8 +114,13 @@ {% if public_transport_lines|length + public_transport_links|length > 0 -%} * '''Fahrplan''': {% 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 %} +** {% set space = joiner(" ") %} + {%- if pt_line.name %}{{ space() }}{{ pt_line.name }}{% endif %} + {%- if pt_line.label %}{{ space() }}{{ pt_line.label }}{% endif %} + {%- if pt_line.timetable_template %}{{ space() }}{{ h.json_template(pt_line.timetable_template) }}{% endif %} + {%- if pt_line.route %}{{ space() }}{{ pt_line.route }}{% endif %} + {%- if pt_line.note %}{{ space() }}{{ pt_line.note }}{% endif %} + {%- for tl in pt_line.timetable_links %}{{ space() }}{{ weblink(tl) }}{% endfor %} {% endfor -%} {% for link in public_transport_links -%} ** {{ weblink(link) }} -- 2.39.5