summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2015-01-15 23:19:04 +0100
committerDaniel Friesel <derf@finalrewind.org>2015-01-15 23:19:04 +0100
commitd643811cf90c5c8874087f200e68910b729473de (patch)
tree914cebd5e8e7e3c179cd8e6b1981da203673379a /templates
parentc7aa0f86a873a3f86d5eab1be4a0d40d49181b00 (diff)
More URA support: Do not require a city to be set
Diffstat (limited to 'templates')
-rw-r--r--templates/main.html.ep12
1 files changed, 6 insertions, 6 deletions
diff --git a/templates/main.html.ep b/templates/main.html.ep
index a3678de..d90aed8 100644
--- a/templates/main.html.ep
+++ b/templates/main.html.ep
@@ -9,7 +9,7 @@
</head>
<body>
-% if ($city and $stop) {
+% if ($stop) {
% if ($errstr) {
<div class="error">Received an error from the backend service:</div>
<div>
@@ -19,25 +19,25 @@
</div>
% }
% elsif ($frontend eq 'png') {
-<img src="/<%= $city %>/<%= $stop %>.png?<%= $params %>" alt=""
+<img src="/<%= $city ? "$city/" : q{} %><%= $stop %>.png?<%= $params %>" alt=""
id="display" height="<%= $height * 4 %>" width="<%= $width * 4 %>"/>
% }
% elsif ($frontend eq 'html') {
-<iframe src="/<%= $city %>/<%= $stop %>.html?<%= $params %>" id="display"
+<iframe src="/<%= $city ? "$city/" : q{} %><%= $stop %>.html?<%= $params %>" id="display"
height="<%= $height * 5 %>" width="<%= $width * 5 %>"></iframe>
% }
% elsif ($frontend eq 'infoscreen') {
<p>
-<a href="/<%= $city %>/<%= $stop %>.html?<%= $params %>&amp;template=infoscreen">Infoscreen for
+<a href="/<%= $city ? "$city/" : q{} %><%= $stop %>.html?<%= $params %>&amp;template=infoscreen">Infoscreen for
<%= $city %> <%= $stop %></a>
</p>
Preview:<br/>
-<iframe src="/<%= $city %>/<%= $stop %>.html?<%= $params %>&amp;template=infoscreen" id="display"
+<iframe src="/<%= $city ? "$city/" : q{} %><%= $stop %>.html?<%= $params %>&amp;template=infoscreen" id="display"
height="<%= $height * 5 %>" width="<%= $width * 5 %>"></iframe>
% }
% elsif ($frontend eq 'json') {
<p>
-<a href="/<%= $city %>/<%= $stop %>.json?<%= $params %>">JSON data for
+<a href="/<%= $city ? "$city/" : q{} %><%= $stop %>.json?<%= $params %>">JSON data for
<%= $city %> <%= $stop %></a>
</p>
<p>