From dd87d4e438674c86c11221617e5273f7534fc865 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 29 Mar 2015 21:39:05 +0200 Subject: add list of individual arrivals / departures --- templates/individualform.html.ep | 9 ++++++++ templates/individuallist.html.ep | 49 ++++++++++++++++++++++++++++++++++++++++ templates/intro.html.ep | 2 ++ 3 files changed, 60 insertions(+) create mode 100644 templates/individualform.html.ep create mode 100644 templates/individuallist.html.ep (limited to 'templates') 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 @@ +
+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'; +
+%= 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) { +
+Keine Daten mit diesen Parametern gefunden. +
+% } +% else { +
+ + +% for my $entry (@{ stash('list') // [] }) { +% my ($station, $time, $delay, $canceled, $dest, $train_type, $train_no, $line_no, $platform) = @{$entry}; + + + + + + + +% } +
BahnhofZeitZugNummerRichtung
+%= $station + +%= $time +% if (defined $delay) { +% if ($delay < 0) { +<%= $delay %> +% } +% elsif ($delay == 0) { ++0 +% } +% else { ++<%= $delay %> +% } +% } + +%= $train_type; + +% if ($line_no) { +%= $line_no; +%} + +%= $train_no + +%= $dest +
+
+% } 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
Top-Liste: %= include 'topform'; +Einzelne Züge +%= include 'individualform';
-- cgit v1.2.3