summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2020-01-05 10:02:54 +0100
committerDaniel Friesel <derf@finalrewind.org>2020-01-05 10:02:54 +0100
commit7e825ba8a3480773e42823756355ff5e2367586c (patch)
tree34ffe76443375f4cb45e8e78abfd8421ae8baf5f
parent75e54f73e5d9e935a9355c427422697bfd97d6f1 (diff)
map: simplify error handling
-rw-r--r--lib/DBInfoscreen/Controller/Map.pm4
-rw-r--r--templates/route_map.html.ep10
2 files changed, 3 insertions, 11 deletions
diff --git a/lib/DBInfoscreen/Controller/Map.pm b/lib/DBInfoscreen/Controller/Map.pm
index 6337432..01520b7 100644
--- a/lib/DBInfoscreen/Controller/Map.pm
+++ b/lib/DBInfoscreen/Controller/Map.pm
@@ -123,8 +123,10 @@ sub route {
my ($err) = @_;
$self->render(
'route_map',
- title => "Fehler",
+ title => "DBF",
hide_opts => 1,
+ with_map => 1,
+ error => $err,
);
}
diff --git a/templates/route_map.html.ep b/templates/route_map.html.ep
index 72ef215..215444f 100644
--- a/templates/route_map.html.ep
+++ b/templates/route_map.html.ep
@@ -1,12 +1,3 @@
-% if (my $err = stash('error')) {
- <div class="container">
- <div class="error">
- <strong>Fehler bei der Routenabfrage</strong>
-%= $err
- </div>
- </div>
-% }
-% else {
<div class="container">
<div id="map" style="height: 500px;">
</div>
@@ -51,4 +42,3 @@ for (var station_id in stations) {
}
</script>
-% }