]> ToastFreeware Gitweb - philipp/winterrodeln/wrpylib.git/blob - wrpylib/templates/sledrun_wikitext.txt
If a gastronomy has a link without text, put the link below the name.
[philipp/winterrodeln/wrpylib.git] / wrpylib / templates / sledrun_wikitext.txt
1 {% block content %}
2 {%- macro weblink(value) -%}
3 {% if value.text %}[{{ value.url }} {{ value.text }}]{% else %}{{ value.url }}{% endif %}
4 {%- endmacro %}
5 {%- macro wr_page(value) -%}
6 [[{{ value.title }}{% if value.text %}|{{ value.text }}{% endif %}]]
7 {%- endmacro -%}
8 {% if sledrun_json.entry_under_construction %}{% raw %}{{In Arbeit|Rodelbahn}}{% endraw %}
9
10 {% endif -%}
11 == Allgemeines ==
12 {{ rodelbahnbox }}
13 {{ description | default("''Hier wird die Rodelbahn allgemein beschrieben.''") | trim }}
14 {%- if sledrun_json.tiroler_naturrodelbahn_gütesiegel %}
15 {% set gs = sledrun_json.tiroler_naturrodelbahn_gütesiegel %}
16 {{ h.key_value_template('Tiroler Naturrodelbahn Gütesiegel', {
17     'Erstverleihung': gs.get('first_issued'),
18     'Verlängerung': gs.get('valid_from'),
19     'Forum': gs.get('forum_id'),
20     'Thread': gs.get('thread_id'),
21     'Anlagename': gs.get('name'),
22     'Organisation': gs.get('organization'),
23 }) }}
24 {%- endif %}
25 {% raw %}
26 * {{Position oben}}
27 * {{Position unten}}
28 * {{Höhenunterschied}}
29 * {{Bahnlänge}}
30 * {{Gehzeit}}{% endraw %}
31   {%- if walkup_time_note %} ({{ walkup_time_note }})
32   {%- else %}
33   {%- if walkup_possible is false %} (ein Aufstieg zu Fuß ist nicht möglich){% endif %}
34   {%- endif %}
35 * '''Beleuchtung''': {{ nightlight_description | default( nightlight_possible | default("''Unbekannt''") ) | trim }}
36 * '''Rodelverleih''': {% if sled_rental_description -%}
37 {{ sled_rental_description | trim }}
38 {%- else -%}
39 {% if sled_rental -%}
40 {% if sled_rental|length == 0 %}Nein{% endif %}
41 {%- else -%}
42 {{ sled_rental_direct | german_bool | default("''Unbekannt''") }}
43 {%- endif %}
44 {%- endif -%}
45 {% for rental in sled_rental %}
46 ** {% set space = joiner(" ") %}
47    {%- if rental.name %}{{ space() }}
48    {%- if rental.weblink and not rental.weblink.text %}{{ weblink({"url": rental.weblink.url, "text": rental.name}) }}
49    {%- else %}{{ rental.name }}
50    {%- endif %}
51    {%- endif %}
52    {%- if rental.wr_page %}{{ space() }}{{ wr_page(rental.wr_page) }}{% endif %}
53    {%- if rental.weblink and not (rental.name and not rental.weblink.text) %}
54    {{- space() }}{{ weblink(rental.weblink) }}{% endif %}
55    {%- if rental.note %}{{ space() }}({{ rental.note }}){% endif %}
56 {%- endfor %}
57 * '''Schneelage - Auskunft''':
58 {%- for info in info_phone %}
59 ** {{ info.phone }} ({{ info.name }})
60 {%- endfor %}
61 {%- for info in info_web %}
62 ** {{ weblink(info) }}
63 {%- endfor %}
64 * '''Betreiber''': {{ operator }}
65 * '''Hütten''': {{ gastronomy_description }}
66 {%- for info in gastronomy %}
67 ** {% set space = joiner(" ") %}
68    {%- if info.name %}{{ space() }}
69    {%- if info.weblink and not info.weblink.text %}{{ weblink({"url": info.weblink.url, "text": info.name}) }}
70    {%- else %}{{ info.name }}
71    {%- endif %}
72    {%- endif %}
73    {%- if info.wr_page %}{{ space() }}{{ wr_page(info.wr_page) }}{% endif %}
74    {%- if info.weblink and not (info.name and not info.weblink.text) %}
75    {{- space() }}{{ weblink(info.weblink) }}{% endif %}
76    {%- if info.note %}{{ space() }}({{ info.note }}){% endif %}
77 {%- endfor %}
78 * '''Andere Rodelbahnen''':
79 {%- for info in sledrun_list %}
80 ** {{ wr_page(info) }}
81 {%- endfor %}
82 * '''Siehe auch''':
83 {%- for info in see_also %}
84 ** {{ weblink(info) }}
85 {%- endfor %}
86
87 {{ h.key_value_template('Buttonleiste', {
88     'Bericht': allow_reports|german_bool,
89     'ForumId': forum_id,
90     'Gütesiegel': tiroler_naturrodelbahn_gütesiegel.thread_id if tiroler_naturrodelbahn_gütesiegel else '',
91     'Impressionen': impressions_title,
92     'Wetter': 'Ja' if position else '',
93     'webcam': webcams[0].url if webcams and webcams|length > 0 else '',
94     'video': videos[0].url if videos and videos|length > 0 else '',
95     'Korrektur': 'Seite',
96     'Korrektur_To': correction_email,
97     'Korrektur_To_Name': correction_name,
98     'Freizeitticket': 'Ja' if freizeitticket_tyrol else '',
99     'Regiocard': 'Ja' if regio_card_tyrol else '',
100 }) }}
101 {% raw %}{{Clear}}{% endraw %}
102
103
104 == Landkarte ==
105 {% if map_json is none -%}
106 ''leider ist derzeit keine [[Winterrodeln:Landkarte|Landkarte]] zu dieser Rodelbahn vorhanden''
107 {%- else -%}
108 {{ h.create_wrmap(map_json) }}
109 {% raw %}{{Landkarte Legende}}<br/>{{GoogleMaps Hinweis}}{% endraw %}
110 {%- endif %}
111
112
113 == Anreise mit öffentlichen Verkehrsmitteln ==
114 {% if public_transport_description -%}
115 {{ public_transport_description | trim }}
116 {%- else -%}
117 ''Hier wird die Anreise mit öffentlichen Verkehrsmitteln beschrieben.''
118 {%- endif %}
119
120 {% for pt_stop in public_transport_stops -%}
121 * {{ 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', {}))]) }}
122 {%- if pt_stop.note %} ({{ pt_stop.note }}){% endif %}
123 {% for template_name in ['monitor_template', 'route_arrival_template', 'route_departure_template'] -%}
124 {% if template_name in pt_stop -%}
125 ** {{ h.json_template(pt_stop[template_name]) }}
126 {% endif %}
127 {%- endfor %}
128 {%- endfor -%}
129 {% if public_transport_lines|length + public_transport_links|length > 0 -%}
130 * '''Fahrplan''':
131 {% for pt_line in public_transport_lines -%}
132 ** {% set space = joiner(" ") %}
133    {%- if pt_line.name %}{{ space() }}{{ pt_line.name }}{% endif %}
134    {%- if pt_line.label %}{{ space() }}{{ pt_line.label }}{% endif %}
135    {%- if pt_line.timetable_template %}{{ space() }}{{ h.json_template(pt_line.timetable_template) }}{% endif %}
136    {%- if pt_line.route %}{{ space() }}{{ pt_line.route }}{% endif %}
137    {%- if pt_line.note %}{{ space() }}{{ pt_line.note }}{% endif %}
138    {%- for tl in pt_line.timetable_links %}{{ space() }}{{ weblink(tl) }}{% endfor %}
139 {% endfor -%}
140 {% for link in public_transport_links -%}
141 ** {{ weblink(link) }}
142 {% endfor %}
143 {% endif %}
144 == Anreise mit dem Auto ==
145 {% if car_description -%}
146 {{ car_description | trim }}
147 {%- else -%}
148 ''Hier wird die Anreise mit dem Auto beschrieben.''
149 {%- endif %}
150
151 {% for parking in sledrun_json.car_parking -%}
152 * '''Parkplatz''': {{ h.list_template('Parkplatz', [h.json_pos_ele_position(parking.position), h.json_pos_ele_elevation(parking.position)]) }}
153 {%- if parking.note %} ({{ parking.note }}){% endif %}
154 {% endfor -%}
155 {% for distance_info in sledrun_json.car_distances -%}
156 {% if loop.first -%}
157 * '''Entfernung''':
158 {% endif -%}
159 ** {{ distance_info.route }}: {{ distance_info.km }} km
160 {% endfor %}
161
162 {{ h.key_value_template('Rodelbahnzustand', {'Forumlink': sledrun_json.forum_id}) }}
163
164 [[Kategorie:Rodelbahn]]
165 {% if sledrun_json.entry_under_construction %}[[Kategorie:In Arbeit]]{% endif -%}
166 {% endblock %}