summaryrefslogtreecommitdiff
path: root/templates/select_backend.html.ep
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-08-21 19:39:30 +0200
committerBirte Kristina Friesel <derf@finalrewind.org>2024-08-21 19:39:30 +0200
commit1a185897e271a9c6471071d8b9b70a5fed16e596 (patch)
tree34182b0628b993c20e0fd643fb7cc4079393f8ad /templates/select_backend.html.ep
parent4c7b3117cd55b3cae67277a4280e2412d2e71ff8 (diff)
backend selection: add coverage regions and links to coverage map2.8.27
Diffstat (limited to 'templates/select_backend.html.ep')
-rw-r--r--templates/select_backend.html.ep16
1 files changed, 13 insertions, 3 deletions
diff --git a/templates/select_backend.html.ep b/templates/select_backend.html.ep
index 0f65039..d5bc9d5 100644
--- a/templates/select_backend.html.ep
+++ b/templates/select_backend.html.ep
@@ -17,12 +17,22 @@
% for my $backend (@{ stash('backends') // [] }) {
<div class="row">
<div class="col s8 m6 l6 right-align">
- % if ($backend->{longname}) {
- <a href="<%= $backend->{homepage} %>"><%= $backend->{longname} %></a>
- % }
+ %= $backend->{longname}
% if ($backend->{id} == $user->{backend_id}) {
(aktuell ausgewählt)
% }
+ % if ($backend->{has_area}) {
+ <br/>
+ <a href="https://dbf.finalrewind.org/coverage/HAFAS/<%= $backend->{name} %>"><%= join(q{, }, @{$backend->{regions} // []}) || '[Karte]' %></a>
+ % }
+ % elsif ($backend->{regions}) {
+ <br/>
+ %= join(q{, }, @{$backend->{regions} // []})
+ % }
+ % if ($backend->{homepage}) {
+ <br/>
+ <a href="<%= $backend->{homepage} %>"><%= $backend->{homepage} =~ s{ ^ http s? :// (?: www[.] )? (.*?) (?: / )? $ }{$1}xr %></a>
+ % }
</div>
<div class="col s4 m6 l6 left-align">
<button class="btn waves-effect waves-light <%= $backend->{id} == $user->{backend_id} ? 'disabled' : q{} %>" style="min-width: 6em;" type="submit" name="backend" value="<%= $backend->{id} %>">