summaryrefslogtreecommitdiff
path: root/templates/individuallist.html.ep
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2015-03-29 21:39:05 +0200
committerDaniel Friesel <derf@finalrewind.org>2015-03-29 21:39:05 +0200
commitdd87d4e438674c86c11221617e5273f7534fc865 (patch)
treea30cdddd6e60a5b20ac0bf22969b73a87edee9dc /templates/individuallist.html.ep
parentf8aa6ff141ac37aa8655277c102f1b58cfc776ad (diff)
add list of individual arrivals / departures
Diffstat (limited to 'templates/individuallist.html.ep')
-rw-r--r--templates/individuallist.html.ep49
1 files changed, 49 insertions, 0 deletions
diff --git a/templates/individuallist.html.ep b/templates/individuallist.html.ep
new file mode 100644
index 0000000..2c57ca3
--- /dev/null
+++ b/templates/individuallist.html.ep
@@ -0,0 +1,49 @@
+%= include 'individualform';
+
+% if (@{$list} == 0) {
+<div class="error">
+Keine Daten mit diesen Parametern gefunden.
+</div>
+% }
+% else {
+<div class="individuallist">
+<table>
+<tr><th>Bahnhof</th><th>Zeit</th><th>Zug</th><th>Nummer</th><th>Richtung</th></tr>
+% for my $entry (@{ stash('list') // [] }) {
+% my ($station, $time, $delay, $canceled, $dest, $train_type, $train_no, $line_no, $platform) = @{$entry};
+<tr>
+<td class="station">
+%= $station
+</td>
+<td class="time">
+%= $time
+% if (defined $delay) {
+% if ($delay < 0) {
+<span class="undelay"><%= $delay %></span>
+% }
+% elsif ($delay == 0) {
+<span class="delay0">+0</span>
+% }
+% else {
+<span class="delay">+<%= $delay %></span>
+% }
+% }
+</td>
+<td class="train">
+%= $train_type;
+
+% if ($line_no) {
+%= $line_no;
+%}
+</td>
+<td class="train_no">
+%= $train_no
+</td>
+<td class="destination">
+%= $dest
+</td>
+</tr>
+% }
+</table>
+</div>
+% }