summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2022-07-15 22:26:50 +0200
committerDaniel Friesel <derf@finalrewind.org>2022-07-15 22:26:50 +0200
commit8c15966bd1be2bc8098cd71c64a7f8aa01df885a (patch)
treefeb6fbb653d563e94a4f97b65744b8826b6bea60
parent84730c98a19a23a46985dbc88d6bfdcad277bd3b (diff)
dbf: link to currently checked in train1.23.2
-rwxr-xr-xlib/Travelynx.pm2
-rw-r--r--lib/Travelynx/Model/Users.pm2
-rw-r--r--templates/_checked_in.html.ep4
3 files changed, 5 insertions, 3 deletions
diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm
index a35245f..afc065f 100755
--- a/lib/Travelynx.pm
+++ b/lib/Travelynx.pm
@@ -1384,6 +1384,8 @@ sub startup {
my $ret = $template;
$ret =~ s{[{]eva[}]}{$opt{eva}}g;
$ret =~ s{[{]name[}]}{$opt{name}}g;
+ $ret =~ s{[{]tt[}]}{$opt{tt}}g;
+ $ret =~ s{[{]tn[}]}{$opt{tn}}g;
return $ret;
}
);
diff --git a/lib/Travelynx/Model/Users.pm b/lib/Travelynx/Model/Users.pm
index dc8c1a9..b0fdba0 100644
--- a/lib/Travelynx/Model/Users.pm
+++ b/lib/Travelynx/Model/Users.pm
@@ -12,7 +12,7 @@ use DateTime;
my @sb_templates = (
undef,
- [ 'DBF', 'https://dbf.finalrewind.org/{name}' ],
+ [ 'DBF', 'https://dbf.finalrewind.org/{name}?show_realtime=1#{tt}{tn}' ],
[ 'marudor.de', 'https://marudor.de/{name}' ],
[ 'NVM', 'https://nvm.finalrewind.org/board/{eva}' ],
);
diff --git a/templates/_checked_in.html.ep b/templates/_checked_in.html.ep
index dd00026..533e73c 100644
--- a/templates/_checked_in.html.ep
+++ b/templates/_checked_in.html.ep
@@ -104,7 +104,7 @@
</div>
<div style="float: right; text-align: right;">
% if ($user->{sb_template}) {
- <b><a href="<%= resolve_sb_template($user->{sb_template}, name => $journey->{arr_name}, eva => $journey->{arr_eva}) %>" class="unmarked"><%= $journey->{arr_name} %></a></b><br/>
+ <b><a href="<%= resolve_sb_template($user->{sb_template}, name => $journey->{arr_name}, eva => $journey->{arr_eva}, tt => $journey->{train_type} // q{x}, tn => $journey->{train_no}) %>" class="unmarked"><%= $journey->{arr_name} %></a></b><br/>
% }
% else {
<b><%= $journey->{arr_name} %></b><br/>
@@ -331,7 +331,7 @@
% }
</a>
% if ($user->{sb_template}) {
- <a class="nonflex" href="<%= resolve_sb_template($user->{sb_template}, name => $station->[0], eva => $station->[1]{eva}) %>"><i class="material-icons tiny">info</i></a>
+ <a class="nonflex" href="<%= resolve_sb_template($user->{sb_template}, name => $station->[0], eva => $station->[1]{eva}, tt => $journey->{train_type} // q{x}, tn => $journey->{train_no}) %>"><i class="material-icons tiny">info</i></a>
% }
% }
% if ($user->{sb_template}) {