]> ToastFreeware Gitweb - philipp/winterrodeln/wradmin.git/commitdiff
Further work on wikitext template.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Sat, 7 Aug 2021 21:12:06 +0000 (23:12 +0200)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Sat, 7 Aug 2021 21:12:06 +0000 (23:12 +0200)
wradmin/templates/rodelbahn_view_wikitext.html

index a473aafbdb38cc1c75a44641154c4a9c807565e4..e340b3c1e248c0899ee3e76679a98bd9cae63f6d 100644 (file)
 {% if 'public_transport_description' in sledrun_json %}{{ sledrun_json['public_transport_description'] }}
 {%- else %}''Hier wird die Anreise mit öffentlichen Verkehrsmitteln beschrieben.''{% endif %}
 
-{% for pt_stop in sledrun_json.get('public_transport_stops', []) %}
+{% for pt_stop in sledrun_json.get('public_transport_stops', []) -%}
 * {{ h.list_template('Haltestelle', [pt_stop.get('name', ''), '', h.json_pos_ele_position(pt_stop.get('position', '')), h.json_pos_ele_elevation(pt_stop.get('position', ''))]) }}
-{% for template_name in ['monitor_template', 'route_arrival_template', 'route_departure_template'] %}
-{%- if template_name in pt_stop -%}
+{% for template_name in ['monitor_template', 'route_arrival_template', 'route_departure_template'] -%}
+{% if template_name in pt_stop -%}
 ** {{ h.json_template(pt_stop[template_name]) }}
 {% endif %}
 {%- endfor %}
-{%- endfor %}
-* {Haltestelle|Imst|Rastbühel/Hochbehälter|47.255415 N 10.738377 E|975}}
-** {Fahrplan Abfahrtsmonitor VVT|Imst|Rastbühel/Hochbehälter|62295}}
-** {Fahrplan Hinfahrt VVT|Imst|Rastbühel/Hochbehälter}}
-** {Fahrplan Rückfahrt VVT|Imst|Rastbühel/Hochbehälter}}
+{%- endfor -%}
+{% for pt_line in sledrun_json.get('public_transport_lines', []) -%}
+{% if loop.first -%}
 * '''Fahrplan''':
-** {Fahrplan Linie VVT|Imst Linie 2|Imst, Rastbühel/Hochbehälter}}
-** {Fahrplan Linie VVT|4266|Imst, Rastbühel/Hochbehälter}}
+{% endif -%}
+** {% if pt_line.timetable_template is defined %}{{ h.json_template(pt_line.timetable_template) }}
+   {%- else %}{{ pt_line.name }}{% endif %}
+{% endfor %}
 
 
 == Anreise mit dem Auto ==
-Über die Autobahn ''A12'' bis zur Ausfahrt Imst (bzw. über die Bundesstraße ''B171''), weiter auf der ''B189'' (Mieminger Straße) Richtung Norden fast an Imst vorbei bis zur Abzweigung zum ''Hahntennjoch'' (''L246''). Der Straße bis zu einer Rechtskurve mit Hochbehälter im Ortsteil Rastbühel folgen; dort zweigt die Rodelbahn genau in der Kurve ab (bei der Tafel der Muttekopfhütte).
-Der Parkplatz bietet Platz für ca. 40 Autos.
-
-* '''Parkplatz''': {Parkplatz|47.255415 N 10.738377 E|975}}
+{% if 'car_description' in sledrun_json %}{{ sledrun_json.car_description }}
+{%- else %}''Hier wird die Anreise mit dem Auto beschrieben.''{% endif %}
+
+{% for parking in sledrun_json.car_parking -%}
+* '''Parkplatz''': {{ h.list_template('Parkplatz', [h.json_pos_ele_position(parking.position), h.json_pos_ele_elevation(parking.position)]) }}
+{% endfor -%}
+{% for distance_info in sledrun_json.car_distances -%}
+{% if loop.first -%}
 * '''Entfernung''':
-** von '''Innsbruck''' (Hauptbahnhof): 61.9 km (über Autobahn '''A12''')
-** von '''Landeck''': 21.5 km (über '''B171''')
-
+{% endif -%}
+** {{ distance_info.route }}: {{ distance_info.km }} km
+{% endfor %}
 
-{Rodelbahnzustand|Forumlink=170}}
+{% raw %}{{Rodelbahnzustand|Forumlink={% endraw %}{{ sledrun_json.forum_id }}}}
 
 [[Kategorie:Rodelbahn]]
 </pre>