summaryrefslogtreecommitdiff
path: root/templates/infoscreen.html.ep
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2014-08-20 18:49:36 +0200
committerDaniel Friesel <derf@finalrewind.org>2014-08-20 18:49:36 +0200
commit5bca4819dd35226886e85adf6e6c3cebdf1fb00a (patch)
treeeeddde4349108f84c8fa252e467da91c8bf3257c /templates/infoscreen.html.ep
parent9d09737ac16b1f3715c38f57830b41a3269d85d9 (diff)
move application from cgi directory to project root
Diffstat (limited to 'templates/infoscreen.html.ep')
-rw-r--r--templates/infoscreen.html.ep71
1 files changed, 71 insertions, 0 deletions
diff --git a/templates/infoscreen.html.ep b/templates/infoscreen.html.ep
new file mode 100644
index 0000000..47c435c
--- /dev/null
+++ b/templates/infoscreen.html.ep
@@ -0,0 +1,71 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title><%= $title %></title>
+ <meta charset="utf-8">
+% if ($self->stash('refresh_interval')) {
+ <meta http-equiv="refresh" content="<%= $self->stash('refresh_interval') %>"/>
+% }
+
+ %= stylesheet '/infoscreen.css'
+ %= javascript '/jquery-2.1.1.min.js'
+</head>
+<body>
+
+% if (my $error = stash 'error') {
+<div class="error">Received an error from the backend service:</div>
+<div>
+<pre>
+%= $error
+</pre>
+</div>
+% }
+
+<div class="displayclean">
+<ul>
+% for my $departure (@{$raw}) {
+% my $linetype = q{};
+% given ($departure->type) {
+% when ($_ =~ m{enbahn$}) { $linetype = 'tram' }
+% when ('S-Bahn') { $linetype = 'sbahn' }
+% when ([qw[NE Niederflurbus SB Bus]]) { $linetype = 'bus' }
+% when ('U-Bahn') { $linetype = 'ubahn' }
+% }
+<li>
+<span class="line <%= $linetype %>">
+%= $departure->line
+</span>
+<span class="route">
+% if ($departure->lineref) {
+%= $departure->lineref->route
+% }
+</span>
+<span class="dest">
+%= $departure->destination
+</span>
+<span class="countdown">
+% if ($departure->delay) {
+<span class="delay"> (+<%= $departure->delay %>) </span>
+% }
+% if ($departure->is_cancelled) {
+<span class="delay"> FĂ„LLT AUS </span>
+% }
+% else {
+<%= $departure->countdown %> min
+% }
+</span>
+<span class="time">
+%= $departure->time
+</span>
+</li>
+% }
+</ul>
+</div>
+
+<div class="about">
+<a href="http://finalrewind.org/projects/db-fakedisplay/">db-fakedisplay</a>
+v<%= $version %>
+</div>
+
+</body>
+</html>