From a9eee385a519f90faf8f89f5612fb91094e0ce97 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 9 Oct 2013 18:30:06 +0200 Subject: use local jquery, some code cleanup --- cgi/templates/main.html.ep | 55 ++++++++++++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 21 deletions(-) (limited to 'cgi/templates/main.html.ep') diff --git a/cgi/templates/main.html.ep b/cgi/templates/main.html.ep index c9ab3cf..6a0d560 100644 --- a/cgi/templates/main.html.ep +++ b/cgi/templates/main.html.ep @@ -26,14 +26,15 @@ div.error { font-size: 150%; font-weight: bold; - color: #dd0000; + color: #ee0000; } pre { margin-bottom: 2em; } - span.optional { + span.optional, + span.notes { color: #666666; } @@ -66,13 +67,13 @@ } - + %= javascript 'jquery-1.10.2.min.js' % if ($city and $stop) { % if ($errstr) { -
Error from backend:
+
Received an error from the backend service:
 %= $errstr
@@ -119,7 +120,7 @@ documentation
 
  • version: Program version (string, not numeric)
  • % } -% } +% } # ($city and $stop) % else {

    @@ -136,20 +137,20 @@ other German transit networks.

    -<% if (my $error = stash 'error') { %> +% if (my $error = stash 'error') {

    Error: <%= $error %>

    -<% } %> +% } -<%= form_for _redirect => begin %> +%= form_for _redirect => begin
    City → Stop
    - <%= text_field 'city' %> - <%= text_field 'stop' %> - <%= submit_button 'Display' %> + %= text_field 'city' + %= text_field 'stop' + %= submit_button 'Display'
    @@ -157,36 +158,48 @@ other German transit networks.
    display height [1..10]
    -
    <%= text_field 'no_lines' %>
    +
    + %= text_field 'no_lines' +
    min. offset [minutes]
    -
    <%= text_field 'offset' %>
    +
    + %= text_field 'offset' +
    match line prefix
    -
    <%= text_field 'line' %>
    +
    + %= text_field 'line' +
    match platform
    -
    <%= text_field 'platform' %>
    +
    + %= text_field 'platform' +
    backend
    -
    <%= select_field backend => [['EFA (VRR)' => 'vrr'], ['HAFAS (DB)' => 'db']] %>
    +
    + %= select_field backend => [['EFA (VRR)' => 'vrr'], ['HAFAS (DB)' => 'db']] +
    frontend
    -
    <%= select_field frontend => [['Image (PNG)' => 'png'], ['HTML' => 'html'], ['JSON' => 'json']] %>
    +
    + %= select_field frontend => [['Image (PNG)' => 'png'], ['HTML' => 'html'], ['JSON' => 'json']] +
    -<% end %> +% end
    -notes: +notes:
    • The EFA backend does not support Umlauts
    • For Düsseldorf, the DB backend usually gives better results
    • @@ -202,7 +215,7 @@ shorten destination names v<%= $version %>
    - +% end -- cgit v1.2.3