From 087536862b26619fbf63423d15469d46d70f2365 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Sat, 24 Aug 2024 07:42:20 +0200 Subject: refactor backend details into sub-template --- templates/_backend_line.html.ep | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 templates/_backend_line.html.ep (limited to 'templates/_backend_line.html.ep') diff --git a/templates/_backend_line.html.ep b/templates/_backend_line.html.ep new file mode 100644 index 0000000..5f2bcf1 --- /dev/null +++ b/templates/_backend_line.html.ep @@ -0,0 +1,25 @@ +
+
+ %= $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 %> + % } +
+
+ +
+
-- cgit v1.2.3