diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/barform.html.ep | 17 | ||||
-rw-r--r-- | templates/bargraph.html.ep | 2 | ||||
-rw-r--r-- | templates/intro.html.ep | 4 |
3 files changed, 23 insertions, 0 deletions
diff --git a/templates/barform.html.ep b/templates/barform.html.ep new file mode 100644 index 0000000..4d43f42 --- /dev/null +++ b/templates/barform.html.ep @@ -0,0 +1,17 @@ +%= form_for bar => begin +Bargraph: +% my %yargs = %{$self->barplot_args->{y}}; +% my @yarg_keys = sort keys %yargs; +%= select_field ysource => [map {[$yargs{$_}->{desc}, $_]} @yarg_keys] +aufgeteilt nach +% my %xargs = %{$self->barplot_args->{x}}; +% my @xarg_keys = sort keys %xargs; +%= select_field xsource => [map {[$xargs{$_}->{desc}, $_]} @xarg_keys] +mit +Abmessungen +%= text_field 'width' => 960, class => 'dimension' +x +%= text_field 'height' => 500, class => 'dimension' +Pixel. +%= submit_button 'Go' +% end diff --git a/templates/bargraph.html.ep b/templates/bargraph.html.ep index 310220f..3d5eda2 100644 --- a/templates/bargraph.html.ep +++ b/templates/bargraph.html.ep @@ -1,3 +1,5 @@ +%= include 'barform'; + %= javascript begin show_bargraph('/2ddata.tsv?aggregate=<%= param('xsource') %>&metric=<%= param('ysource') %>', diff --git a/templates/intro.html.ep b/templates/intro.html.ep index 885cd14..1ebb3c0 100644 --- a/templates/intro.html.ep +++ b/templates/intro.html.ep @@ -36,3 +36,7 @@ Insgesamt wurden dabei ist ein Zug durchschnittlich <b><%= sprintf('%.2f', $stats->{delay_avg}) %> Minuten</b> zu spät. </div> + +<div class="forms"> +%= include 'barform'; +</div> |