templates/route.html

changeset 98
c07a77c8a070
parent 48
428cfdf64ccc
--- a/templates/route.html	Tue May 01 13:24:33 2018 +0300
+++ b/templates/route.html	Fri May 04 21:32:16 2018 +0300
@@ -1,5 +1,7 @@
+{% from "macros.html" import route_rep, bus_stop_rep %}
 <html>
 <head>
+	<base href='..' />
 	<link rel="icon" type="image/png" href="../static/favicon.png" />
 	<link rel="stylesheet" type="text/css" href="../static/style.css" />
 	<meta charset='UTF-8' />
@@ -11,18 +13,21 @@
 	<table class='aikataulu' cellspacing="0">
 		<tr>
 			<th class='sarake-aika'>{{tr('time', 'headings')}}</th>
-			<th class='sarake-lähtö'>{{tr('from', 'headings')}}</th>
-			<th class='sarake-määränpää'>{{tr('destination', 'headings')}}</th>
-			<th class='sarake-status'>{{tr('status', 'headings')}}</th>
+			<th class='sarake-lähtö'>{{tr('trip-description', 'headings')}}</th>
 		</tr>
+		{% for stop, schedule in schedules.items() %}
+		<thead>
+		<tr>
+			<td colspan='2'>{{bus_stop_rep(stop)}}</th>
+		</tr>
+		</thead>
 		{% for trip in schedule %}
 		<tr>
 			<td>{{trip['time']}}</td>
-			<td><a href="../trip/{{trip['name']}}">{{trip['from']}}</a></td>
-			<td><a href="../trip/{{trip['name']}}">{{trip['to']}}</a></td>
-			<td><a href="../trip/{{trip['name']}}">{{trip['status']}}</a></td>
+			<td><a href="./trip/{{trip['name']}}">{{trip['description']}}</a></td>
 		</tr>
 		{% endfor %}
+		{% endfor %}
 	</table>
 </body>
 </html>

mercurial