From 644248474333ed76b999a6c9a7278a5949773418 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 27 Mar 2015 16:23:37 +0100 Subject: move query filters to filterform template --- templates/barform.html.ep | 47 +------------------------------------------- templates/filterform.html.ep | 45 ++++++++++++++++++++++++++++++++++++++++++ templates/topform.html.ep | 47 +------------------------------------------- 3 files changed, 47 insertions(+), 92 deletions(-) create mode 100644 templates/filterform.html.ep diff --git a/templates/barform.html.ep b/templates/barform.html.ep index 7aa329e..50ae5fc 100644 --- a/templates/barform.html.ep +++ b/templates/barform.html.ep @@ -27,51 +27,6 @@ x Pixel. %= submit_button 'Go'
-% my $filter_opts = $self->barplot_filters; Optionale Einschränkungen: -
-
- Linie: -
-
- %= select_field filter_line => $filter_opts->{lines} -
-
-
-
- Zugtyp: -
-
- %= select_field filter_train_type => $filter_opts->{train_types} -
-
-
-
- Bahnhof: -
-
- %= select_field filter_station => $filter_opts->{stations} -
-
-
-
- Zielbahnhof: -
-
- %= select_field filter_destination => $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). - %= submit_button 'Go' -
-
+%= include 'filterform'; % end -
diff --git a/templates/filterform.html.ep b/templates/filterform.html.ep new file mode 100644 index 0000000..186b7d6 --- /dev/null +++ b/templates/filterform.html.ep @@ -0,0 +1,45 @@ +% my $filter_opts = $self->barplot_filters; +
+
+ Linie: +
+
+ %= select_field filter_line => $filter_opts->{lines} +
+
+
+
+ Zugtyp: +
+
+ %= select_field filter_train_type => $filter_opts->{train_types} +
+
+
+
+ Bahnhof: +
+
+ %= select_field filter_station => $filter_opts->{stations} +
+
+
+
+ Zielbahnhof: +
+
+ %= select_field filter_destination => $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). + %= submit_button 'Go' +
+
diff --git a/templates/topform.html.ep b/templates/topform.html.ep index ee2e784..cb35c2f 100644 --- a/templates/topform.html.ep +++ b/templates/topform.html.ep @@ -1,51 +1,6 @@
%= form_for top => begin -% my $filter_opts = $self->barplot_filters; Nach Häufigkeit sortierte Verspätungs- und Qualitätsmeldungen. Die Einschränkungen sind alle optional. -
-
- Linie: -
-
- %= select_field filter_line => $filter_opts->{lines} -
-
-
-
- Zugtyp: -
-
- %= select_field filter_train_type => $filter_opts->{train_types} -
-
-
-
- Bahnhof: -
-
- %= select_field filter_station => $filter_opts->{stations} -
-
-
-
- Zielbahnhof: -
-
- %= select_field filter_destination => $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). - %= submit_button 'Go' -
-
+%= include 'filterform'; % end -
-- cgit v1.2.3