summaryrefslogtreecommitdiff
path: root/cgi
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2013-09-22 19:22:42 +0200
committerDaniel Friesel <derf@finalrewind.org>2013-09-22 19:22:42 +0200
commit209d9abb1c8edde498e178182d368cb6f537818f (patch)
treec6397984e8abdef7f0c0533514f577ef8f16913b /cgi
parent71284c782b68eadb627dff24a576faa70874300a (diff)
add json frontend to selection menu
Diffstat (limited to 'cgi')
-rw-r--r--cgi/templates/main.html.ep10
1 files changed, 8 insertions, 2 deletions
diff --git a/cgi/templates/main.html.ep b/cgi/templates/main.html.ep
index 7a2612d..d879cad 100644
--- a/cgi/templates/main.html.ep
+++ b/cgi/templates/main.html.ep
@@ -62,13 +62,19 @@
% if ($city and $stop) {
% if ($frontend eq 'png') {
-<img src="../<%= $city %>/<%= $stop %>.png?<%= $params %>" alt=""
+<img src="/<%= $city %>/<%= $stop %>.png?<%= $params %>" alt=""
id="display" height="<%= $height * 4 %>" width="<%= $width * 4 %>"/>
% }
% elsif ($frontend eq 'html') {
<iframe src="/<%= $city %>/<%= $stop %>.html?<%= $params %>" id="display"
height="<%= $height * 5 %>" width="<%= $width * 5 %>"></iframe>
% }
+% elsif ($frontend eq 'json') {
+<p>
+<a href="/<%= $city %>/<%= $stop %>.json?<%= $params %>">JSON data for
+<%= $city %> <%= $stop %></a>
+</p>
+% }
% }
% else {
@@ -128,7 +134,7 @@ other German transit networks.
</div>
<div class="field">
<div class="desc">frontend</div>
- <div><%= select_field frontend => [['Image (PNG)' => 'png'], ['HTML' => 'html']] %></div>
+ <div><%= select_field frontend => [['Image (PNG)' => 'png'], ['HTML' => 'html'], ['JSON' => 'json']] %></div>
</div>
</div>
<% end %>