From 1a185897e271a9c6471071d8b9b70a5fed16e596 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Wed, 21 Aug 2024 19:39:30 +0200 Subject: backend selection: add coverage regions and links to coverage map --- templates/select_backend.html.ep | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'templates') 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') // [] }) {
- % if ($backend->{longname}) { - <%= $backend->{longname} %> - % } + %= $backend->{longname} % if ($backend->{id} == $user->{backend_id}) { (aktuell ausgewählt) % } + % if ($backend->{has_area}) { +
+ <%= join(q{, }, @{$backend->{regions} // []}) || '[Karte]' %> + % } + % elsif ($backend->{regions}) { +
+ %= join(q{, }, @{$backend->{regions} // []}) + % } + % if ($backend->{homepage}) { +
+ <%= $backend->{homepage} =~ s{ ^ http s? :// (?: www[.] )? (.*?) (?: / )? $ }{$1}xr %> + % }