summaryrefslogtreecommitdiff
path: root/templates/app.html.ep
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2021-07-30 13:53:43 +0200
committerDaniel Friesel <derf@finalrewind.org>2021-07-30 13:53:43 +0200
commit44c35c7aadb4c7992c484053a6f4ddb4368bcb2e (patch)
treea71bd8616286833cb66f8bce3f288213b30b3bfd /templates/app.html.ep
parentbb9a4dfbccd8563133bd36c4d98dd548aec52a47 (diff)
Allow train detail page to be opened in a new tab via middle-click
The detail page is now accessible both via javascript (as before) and via an <a> element wrapping the list entry.
Diffstat (limited to 'templates/app.html.ep')
-rw-r--r--templates/app.html.ep2
1 files changed, 2 insertions, 0 deletions
diff --git a/templates/app.html.ep b/templates/app.html.ep
index ac6d928..07c78bf 100644
--- a/templates/app.html.ep
+++ b/templates/app.html.ep
@@ -49,6 +49,7 @@
% else {
>
% }
+ <a href="/z/<%= Mojo::Util::url_escape(($departure->{train_type} // q{}) . ' ' . ($departure->{train_no} // $departure->{train} // q{}) . '/' . ($departure->{station} // $station)) %>">
<div class="anchor" id="<%= ($departure->{train_type} // q{x}) . ($departure->{train_no} // q{x}) %>"></div>
<div class="line <%= $departure->{linetype} %>">
% if ($departure->{train_type} and $departure->{train_no}) {
@@ -155,6 +156,7 @@
%= $route_str
</span>
% }
+ </a>
</li>
% }