From 8352715ae8ae26d77be42f10f4988821ce833f20 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 7 Mar 2015 23:40:37 +0100 Subject: implement toplist --- templates/intro.html.ep | 4 ++++ templates/topform.html.ep | 51 +++++++++++++++++++++++++++++++++++++++++++++++ templates/toplist.html.ep | 10 ++++++++++ 3 files changed, 65 insertions(+) create mode 100644 templates/topform.html.ep create mode 100644 templates/toplist.html.ep (limited to 'templates') diff --git a/templates/intro.html.ep b/templates/intro.html.ep index 1ebb3c0..dcdfe2b 100644 --- a/templates/intro.html.ep +++ b/templates/intro.html.ep @@ -38,5 +38,9 @@ dabei ist ein Zug durchschnittlich
+Bargraph: %= include 'barform'; +
+Top-Liste: +%= include 'topform';
diff --git a/templates/topform.html.ep b/templates/topform.html.ep new file mode 100644 index 0000000..fae48cd --- /dev/null +++ b/templates/topform.html.ep @@ -0,0 +1,51 @@ +
+%= form_for top => begin +%= submit_button 'Go' +
+% my $filter_opts = $self->barplot_filters; +Optionale Einschränkungen: +
+
+ Linie: +
+
+ %= select_field filter_line => [map {[$_, $_]} @{$filter_opts->{lines}} ] +
+
+
+
+ Zugtyp: +
+
+ %= select_field filter_train_type => [map {[$_, $_]} @{$filter_opts->{train_types}} ] +
+
+
+
+ Bahnhof: +
+
+ %= select_field filter_station => [map {[$_, $_]} @{$filter_opts->{stations}} ] +
+
+
+
+ Zielbahnhof: +
+
+ %= select_field filter_destination => [map {[$_, $_]} @{$filter_opts->{destinations}} ] +
+
+
+
+ Verspätung zwischen +
+
+ %= text_field 'filter_delay_min', class => 'delay', placeholder => '-∞' + und + %= text_field 'filter_delay_max', class => 'delay', placeholder => '+∞' + Minuten (inklusive). +
+
+% end +
diff --git a/templates/toplist.html.ep b/templates/toplist.html.ep new file mode 100644 index 0000000..2784386 --- /dev/null +++ b/templates/toplist.html.ep @@ -0,0 +1,10 @@ +%= include 'topform'; + +
+ + +% for my $entry (@{ stash('toplist') // [] }) { + +% } +
MeldungAnteilAnzahl
<%= $entry->[0] %><%= $entry->[1] %><%= $entry->[2] %>
+
-- cgit v1.2.3