From 8dfc0c027758929345f428c3a24f1b9221f9c81e Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Wed, 20 Aug 2014 18:49:06 +0200 Subject: move application from cgi directory to the project root --- templates/clean.html.ep | 85 +++++++++++++++++++++++ templates/layouts/default.html.ep | 140 ++++++++++++++++++++++++++++++++++++++ templates/multi.html.ep | 56 +++++++++++++++ templates/not_found.html.ep | 13 ++++ templates/single.html.ep | 54 +++++++++++++++ 5 files changed, 348 insertions(+) create mode 100644 templates/clean.html.ep create mode 100644 templates/layouts/default.html.ep create mode 100644 templates/multi.html.ep create mode 100644 templates/not_found.html.ep create mode 100644 templates/single.html.ep (limited to 'templates') diff --git a/templates/clean.html.ep b/templates/clean.html.ep new file mode 100644 index 0000000..ae1167c --- /dev/null +++ b/templates/clean.html.ep @@ -0,0 +1,85 @@ +% if (@{$departures}) { + +
+ +
+ +% } +% else { + +

+DB-Fakedisplay displays the next departures at a DB station, just like the big +LC display in the station itself. +

+ +% } diff --git a/templates/layouts/default.html.ep b/templates/layouts/default.html.ep new file mode 100644 index 0000000..8600b8f --- /dev/null +++ b/templates/layouts/default.html.ep @@ -0,0 +1,140 @@ + + + + <%= $title %> + +% if ($self->stash('refresh_interval')) { + +% } + + + %= stylesheet '/default.css' + %= javascript '/jquery-1.10.2.min.js' + %= javascript '/marquee.js' + %= javascript begin + $(function () { $('marquee').marquee() }); + % end + + + +% if (my $error = stash 'error') { +
Received an error from the backend service:
+
+
+%= $error
+
+
+% } + +%= content + +% if (not $hide_opts) { +
+ + +%= form_for _redirect => begin +
+
+
Station name
+
+% if (stash('stationlist')) { + %= select_field station => stash('stationlist') +% } +% else { + %= text_field 'station' +% } + %= submit_button 'Display' +
+
+
+ optional: +
+
+ only display routes via +
+
+ %= text_field 'via' +
+
+
+
+ on platforms +
+
+ %= text_field 'platforms' +
+
+
+
+ hide delay < 5 minutes +
+
+ %= check_box 'hidelowdelay' => 1 +
+
+
+
+ display type +
+
+ %= select_field mode => [['combined' => 'multi'], ['platform' => 'single'], ['non-DB' => 'clean']] +
+
+
+
+ backend +
+
+ %= select_field backend => [['RIS' => 'ris'], ['IRIS' => 'iris']] +
+
+
+
+ hide input fields +
+
+ %= check_box 'hide_opts' => 1 +
+
+
+% end + +
+ +
+notes: + +
+ +
+examples: + +
+ +
+see also: + +
+ +
+db-fakedisplay +v<%= $version %> +
+% } + + + diff --git a/templates/multi.html.ep b/templates/multi.html.ep new file mode 100644 index 0000000..26f3433 --- /dev/null +++ b/templates/multi.html.ep @@ -0,0 +1,56 @@ +% if (@{$departures}) { + +
+% my $i = 0; +% for my $departure (@{$departures}) { +% $i++; + +
+
+%= $departure->{platform} +
+ +
+%= $departure->{time} +
+ +
+%= $departure->{train} +
+ +
+% my $via_max = @{$departure->{via}}; +% my $via_cur = 0; +% for my $stop (@{$departure->{via}}) { +% $via_cur++; +<%= $stop %><% if ($via_cur < $via_max) { %> - <% } %> +% } +
+ +
+%= $departure->{destination} +
+ +% if ($departure->{info}) { +
+ +%= $departure->{info} + +
+% } + +
+ +% } + +
+ +% } +% else { + +

+DB-Fakedisplay displays the next departures at a DB station, just like the big +LC display in the station itself. +

+ +% } diff --git a/templates/not_found.html.ep b/templates/not_found.html.ep new file mode 100644 index 0000000..ca1fb5f --- /dev/null +++ b/templates/not_found.html.ep @@ -0,0 +1,13 @@ + + + + page not found + + + +
+page not found +
+ + diff --git a/templates/single.html.ep b/templates/single.html.ep new file mode 100644 index 0000000..7376eb4 --- /dev/null +++ b/templates/single.html.ep @@ -0,0 +1,54 @@ +% if (@{$departures}) { + +
+% my $i = 0; +% for my $departure (@{$departures}) { +% $i++; +
+
+%= $departure->{platform} +
+
+%= $departure->{time} +
+
+%= $departure->{train} +
+
+% my $via_max = @{$departure->{via}}; +% my $via_cur = 0; +% for my $stop (@{$departure->{via}}) { +% $via_cur++; +<%= $stop %><% if ($via_cur < $via_max) { %> - <% } %> +% } +
+
+%= $departure->{destination} +
+% if ($departure->{info}) { +
+ +%= $departure->{info} + +
+% } +
+% } + +
+ +% } +% else { + +
+
+Bitte Ansage beachten +
+
+ +

+DB-Fakedisplay displays the next departures at a DB station, just like the big +LC display in the station itself. +

+ +% } -- cgit v1.2.3