summaryrefslogtreecommitdiff
path: root/cgi/templates/main.html.ep
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2013-10-09 13:22:11 +0200
committerDaniel Friesel <derf@finalrewind.org>2013-10-09 13:22:11 +0200
commit7e6c7b269ab3bf3759d5f04568d13065343f89f8 (patch)
tree4020ec0fbc6efa695c64e16db369ac04d8340783 /cgi/templates/main.html.ep
parent42f85516b97b326c24ac0c0cc4727557e0bd32b1 (diff)
show error messages directly in HTML
Diffstat (limited to 'cgi/templates/main.html.ep')
-rw-r--r--cgi/templates/main.html.ep22
1 files changed, 20 insertions, 2 deletions
diff --git a/cgi/templates/main.html.ep b/cgi/templates/main.html.ep
index 54b3196..c9ab3cf 100644
--- a/cgi/templates/main.html.ep
+++ b/cgi/templates/main.html.ep
@@ -23,6 +23,16 @@
text-decoration: none;
}
+ div.error {
+ font-size: 150%;
+ font-weight: bold;
+ color: #dd0000;
+ }
+
+ pre {
+ margin-bottom: 2em;
+ }
+
span.optional {
color: #666666;
}
@@ -56,12 +66,20 @@
}
</style>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js" type="text/javascript"></script>
</head>
<body>
% if ($city and $stop) {
-% if ($frontend eq 'png') {
+% if ($errstr) {
+<div class="error">Error from backend:</div>
+<div>
+<pre>
+%= $errstr
+</pre>
+</div>
+% }
+% elsif ($frontend eq 'png') {
<img src="/<%= $city %>/<%= $stop %>.png?<%= $params %>" alt=""
id="display" height="<%= $height * 4 %>" width="<%= $width * 4 %>"/>
% }