summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/individualform.html.ep9
-rw-r--r--templates/individuallist.html.ep49
-rw-r--r--templates/intro.html.ep2
3 files changed, 60 insertions, 0 deletions
diff --git a/templates/individualform.html.ep b/templates/individualform.html.ep
new file mode 100644
index 0000000..2e5119f
--- /dev/null
+++ b/templates/individualform.html.ep
@@ -0,0 +1,9 @@
+<div>
+Es werden nur maximal 1000 Ergebnisse angezeigt.
+%= form_for individual => begin
+Sortieren nach:
+%= select_field order_by => [['Zeit ↓', 'scheduled_time.d'], ['Zeit ↑', 'scheduled_time.a'], ['Verspätung ↓', 'delay.d'], ['Verspätung ↑', 'delay.a']]
+%= submit_button 'Go';
+<br/>
+%= include 'filterform';
+% end
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>
+% }
diff --git a/templates/intro.html.ep b/templates/intro.html.ep
index 0ddbf4e..9ce6f6f 100644
--- a/templates/intro.html.ep
+++ b/templates/intro.html.ep
@@ -57,4 +57,6 @@ dabei ist ein Zug durchschnittlich
<br/>
<b>Top-Liste</b>:
%= include 'topform';
+<b>Einzelne Züge</b>
+%= include 'individualform';
</div>