summaryrefslogtreecommitdiff
path: root/templates/_train_details.html.ep
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2023-02-12 12:42:55 +0100
committerDaniel Friesel <derf@finalrewind.org>2023-02-12 12:42:55 +0100
commitc65c85f3e23f3d4f5cc3f1faf70b6fb6e9578baa (patch)
treedbcdf3428f9a157b98053e2becd3e7893dce6843 /templates/_train_details.html.ep
parent80c9068e98d2c10f116dd52f9d51ff892936dae5 (diff)
add bahn.expert link to train details page
Diffstat (limited to 'templates/_train_details.html.ep')
-rw-r--r--templates/_train_details.html.ep3
1 files changed, 3 insertions, 0 deletions
diff --git a/templates/_train_details.html.ep b/templates/_train_details.html.ep
index 82f0257..f212525 100644
--- a/templates/_train_details.html.ep
+++ b/templates/_train_details.html.ep
@@ -144,6 +144,9 @@
% elsif ($icetype and $icetype->[1] and $linetype eq 'fern') {
<span class="disabledbutton"><i class="material-icons" aria-hidden="true">train</i> Plan: <%= $icetype->[0] %></span>
% }
+% if ($departure->{train_type} and $departure->{train_no}) {
+ <a class="smallbutton" href="https://bahn.expert/details/<%= $departure->{train_type} %>%20<%= $departure->{train_no} %>/<%= ($departure->{start} // DateTime->now(time_zone => 'Europe/Berlin'))->iso8601 %>?evaNumberAlongRoute=<%= $departure->{eva} %>"><img src="/static/icons/bahn-expert.svg">Details</a>
+% }
% for my $link (@{$departure->{links}}) {
<a class="smallbutton" href="<%= $link->[1] %>"><i class="material-icons" aria-hidden="true">warning</i> <%= $link->[0] %></a>
% }