220 </script> |
221 </script> |
221 </head> |
222 </head> |
222 <body onload='cycle_leaves()'> |
223 <body onload='cycle_leaves()'> |
223 <h1><img src="../static/pysäkki.png" height="128" /><span id='stop-name'>{{ref}} {{name}}</span></h1> |
224 <h1><img src="../static/pysäkki.png" height="128" /><span id='stop-name'>{{ref}} {{name}}</span></h1> |
224 <div class='next-leave'> |
225 <div class='next-leave'> |
225 <table class='next-leave-table'> |
226 <ul class='next-leave-list'> |
226 {% for schedule_entry in schedule[:num_imminent_leaves] %} |
227 {% for schedule_entry in schedule[:num_imminent_leaves] %} |
227 <tbody id="leave-{{schedule_entry['index']}}"> |
228 <li id="leave-{{schedule_entry['index']}}"> |
|
229 |
|
230 <table> |
228 <tr> |
231 <tr> |
229 <td class='next-leave-time'> |
232 <td class='next-leave-time'> |
230 {% if schedule_entry['imminent'] %} |
233 {% if schedule_entry['imminent'] %} |
231 <span class='imminent-leave'>{{schedule_entry['time']}}</span>​ |
234 <span class='imminent-leave'>{{schedule_entry['time']}}</span>​ |
232 {% else %} |
235 {% else %} |
233 {{schedule_entry['time']}}​ |
236 {{schedule_entry['time']}}​ |
234 {% endif %} |
237 {% endif %} |
235 </td> |
238 </td> |
236 <td class='next-leave-route'>{{schedule_entry['route']}}</td> |
239 <td rowspan="2"> |
237 <td class='next-leave-destination'>{{schedule_entry['sign']['destination']}} |
240 <ul class="next-leave-places"> |
238 <span class='via'><br /> |
241 <li class='next-leave-destination'> |
239 {% if num_imminent_leaves > 1 and schedule_entry['sign']['via'][0] and schedule_entry['sign']['via'][1] %} |
242 {{schedule_entry['sign']['destination']}}</li> |
240 {{schedule_entry['sign']['via'][0]}} - {{schedule_entry['sign']['via'][1]}} |
243 {% for entry in schedule_entry['sign']['via'] %} |
241 {% for entry in schedule_entry['sign']['via'][2:] %}<br />{{entry}}{% endfor %}</span> |
244 <li>{{entry}}</li> |
242 {% else %} |
245 {% endfor %} |
243 {% for entry in schedule_entry['sign']['via'] %}{{entry}}<br />{% endfor %}</span> |
246 </ul> |
244 {% endif %} |
247 </td> |
245 </th> |
|
246 </tr> |
248 </tr> |
247 </tbody> |
249 <tr> |
|
250 <td><span class='next-leave-route'>{{schedule_entry['route']}}</span></td> |
|
251 </tr> |
|
252 </table> |
|
253 |
|
254 </li> |
248 {% endfor %} |
255 {% endfor %} |
249 </table> |
256 </ul> |
250 </div> |
257 </div> |
251 {% if schedule[num_imminent_leaves] %} |
258 {% if schedule[num_imminent_leaves] %} |
252 <div id='other-leaves'> |
259 <div id='other-leaves'> |
253 <table cellspacing="0"> |
260 <table cellspacing="0"> |
254 {% for halt in schedule[num_imminent_leaves:] %} |
261 {% for halt in schedule[num_imminent_leaves:num_imminent_leaves + 2] %} |
255 <tr id="leave-{{halt['index']}}" style='display: none'> |
262 <tr id="leave-{{halt['index']}}" style='display: none'> |
256 <td class='other-leave-time'>{{halt['time']}}</td> |
263 <td class='other-leave-time'>{{halt['time']}}</td> |
257 <td class='other-leave-route'>{{halt['route']}}</td> |
264 <td class='other-leave-route'>{{halt['route']}}</td> |
258 <td class='other-leave-destination'>{{halt['sign']['destination']}}</td> |
265 <td class='other-leave-destination'>{{halt['sign']['destination']}}</td> |
259 </tr> |
266 </tr> |