diff options
Diffstat (limited to 'cgi/templates/main.html.ep')
-rw-r--r-- | cgi/templates/main.html.ep | 55 |
1 files changed, 34 insertions, 21 deletions
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 @@ } </style> - <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js" type="text/javascript"></script> + %= javascript 'jquery-1.10.2.min.js' </head> <body> % if ($city and $stop) { % if ($errstr) { -<div class="error">Error from backend:</div> +<div class="error">Received an error from the backend service:</div> <div> <pre> %= $errstr @@ -119,7 +120,7 @@ documentation <li>version: Program version (string, not numeric)</li> </ul> % } -% } +% } # ($city and $stop) % else { <p> @@ -136,20 +137,20 @@ other German transit networks. <div class="input-field"> -<% if (my $error = stash 'error') { %> +% if (my $error = stash 'error') { <p> Error: <%= $error %><br/> </p> -<% } %> +% } -<%= form_for _redirect => begin %> +%= form_for _redirect => begin <div> <div class="field"> <div class="desc">City → Stop</div> <div> - <%= text_field 'city' %> - <%= text_field 'stop' %> - <%= submit_button 'Display' %> + %= text_field 'city' + %= text_field 'stop' + %= submit_button 'Display' </div> </div> <div class="break"></div> @@ -157,36 +158,48 @@ other German transit networks. <div class="field"> <div class="desc" title="number of lines"> display height [1..10]</div> - <div> <%= text_field 'no_lines' %></div> + <div> + %= text_field 'no_lines' + </div> </div> <div class="field"> <div class="desc">min. offset [minutes]</div> - <div><%= text_field 'offset' %></div> + <div> + %= text_field 'offset' + </div> </div> <div class="field"> <div class="desc" title="comma-separated list, example: NE,U,10"> match line prefix</div> - <div><%= text_field 'line' %></div> + <div> + %= text_field 'line' + </div> </div> <div class="field"> <div class="desc" title="comma-separated list. Buggy.">match platform</div> - <div><%= text_field 'platform' %></div> + <div> + %= text_field 'platform' + </div> </div> <div class="field"> <div class="desc">backend</div> - <div><%= select_field backend => [['EFA (VRR)' => 'vrr'], ['HAFAS (DB)' => 'db']] %></div> + <div> + %= select_field backend => [['EFA (VRR)' => 'vrr'], ['HAFAS (DB)' => 'db']] + </div> </div> <div class="field"> <div class="desc">frontend</div> - <div><%= select_field frontend => [['Image (PNG)' => 'png'], ['HTML' => 'html'], ['JSON' => 'json']] %></div> + <div> + %= select_field frontend => [['Image (PNG)' => 'png'], ['HTML' => 'html'], ['JSON' => 'json']] + </div> </div> </div> -<% end %> +% end </div> <!-- input-field --> <div class="notes"> -<span class="optional">notes:</span> +<span class="notes">notes:</span> <ul> <li>The EFA backend does not support Umlauts</li> <li>For Düsseldorf, the DB backend usually gives better results</li> @@ -202,7 +215,7 @@ shorten destination names</li> v<%= $version %> </div> -<script type="text/javascript"> +%= javascript begin function reloadDisplay() { d = new Date(); $("#display").attr("src", "../<%= $city %>/<%= $stop %>.<%= $frontend %>?<%= $params %>&r="+d.getTime()) @@ -210,7 +223,7 @@ function reloadDisplay() { } setTimeout('reloadDisplay()', 60000); -</script> +% end </body> |