diff options
author | Daniel Friesel <derf@finalrewind.org> | 2015-03-07 23:40:37 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2015-03-07 23:40:37 +0100 |
commit | 8352715ae8ae26d77be42f10f4988821ce833f20 (patch) | |
tree | 243ab5df8844e201915af814d6b838b443a4f343 /templates | |
parent | 9bc85128d7e02c6cb73ec08eff490200af63b730 (diff) |
implement toplist
Diffstat (limited to 'templates')
-rw-r--r-- | templates/intro.html.ep | 4 | ||||
-rw-r--r-- | templates/topform.html.ep | 51 | ||||
-rw-r--r-- | templates/toplist.html.ep | 10 |
3 files changed, 65 insertions, 0 deletions
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 </div> <div class="forms"> +<b>Bargraph</b>: %= include 'barform'; +<br/> +<b>Top-Liste</b>: +%= include 'topform'; </div> 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 @@ +<div> +%= form_for top => begin +%= submit_button 'Go' +<br/> +% my $filter_opts = $self->barplot_filters; +Optionale Einschränkungen: +<div class="field"> + <div class="desc"> + Linie: + </div> + <div> + %= select_field filter_line => [map {[$_, $_]} @{$filter_opts->{lines}} ] + </div> +</div> +<div class="field"> + <div class="desc"> + Zugtyp: + </div> + <div> + %= select_field filter_train_type => [map {[$_, $_]} @{$filter_opts->{train_types}} ] + </div> +</div> +<div class="field"> + <div class="desc"> + Bahnhof: + </div> + <div> + %= select_field filter_station => [map {[$_, $_]} @{$filter_opts->{stations}} ] + </div> +</div> +<div class="field"> + <div class="desc"> + Zielbahnhof: + </div> + <div> + %= select_field filter_destination => [map {[$_, $_]} @{$filter_opts->{destinations}} ] + </div> +</div> +<div class="field"> + <div class="desc"> + Verspätung zwischen + </div> + <div> + %= text_field 'filter_delay_min', class => 'delay', placeholder => '-∞' + und + %= text_field 'filter_delay_max', class => 'delay', placeholder => '+∞' + Minuten (inklusive). + </div> +</div> +% end +<div> 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'; + +<div class="toplist"> +<table> +<tr><th>Meldung</th><th>Anteil</th><th>Anzahl</th></tr> +% for my $entry (@{ stash('toplist') // [] }) { +<tr><td><%= $entry->[0] %></td><td><%= $entry->[1] %></td><td><%= $entry->[2] %></td></tr> +% } +</table> +</div> |