dbf: link to currently checked in train

This commit is contained in:
Daniel Friesel 2022-07-15 22:26:50 +02:00
parent 84730c98a1
commit 8c15966bd1
No known key found for this signature in database
GPG key ID: 100D5BFB5166E005
3 changed files with 5 additions and 3 deletions

View file

@ -1384,6 +1384,8 @@ sub startup {
my $ret = $template; my $ret = $template;
$ret =~ s{[{]eva[}]}{$opt{eva}}g; $ret =~ s{[{]eva[}]}{$opt{eva}}g;
$ret =~ s{[{]name[}]}{$opt{name}}g; $ret =~ s{[{]name[}]}{$opt{name}}g;
$ret =~ s{[{]tt[}]}{$opt{tt}}g;
$ret =~ s{[{]tn[}]}{$opt{tn}}g;
return $ret; return $ret;
} }
); );

View file

@ -12,7 +12,7 @@ use DateTime;
my @sb_templates = ( my @sb_templates = (
undef, undef,
[ 'DBF', 'https://dbf.finalrewind.org/{name}' ], [ 'DBF', 'https://dbf.finalrewind.org/{name}?show_realtime=1#{tt}{tn}' ],
[ 'marudor.de', 'https://marudor.de/{name}' ], [ 'marudor.de', 'https://marudor.de/{name}' ],
[ 'NVM', 'https://nvm.finalrewind.org/board/{eva}' ], [ 'NVM', 'https://nvm.finalrewind.org/board/{eva}' ],
); );

View file

@ -104,7 +104,7 @@
</div> </div>
<div style="float: right; text-align: right;"> <div style="float: right; text-align: right;">
% if ($user->{sb_template}) { % 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 { % else {
<b><%= $journey->{arr_name} %></b><br/> <b><%= $journey->{arr_name} %></b><br/>
@ -331,7 +331,7 @@
% } % }
</a> </a>
% if ($user->{sb_template}) { % 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}) { % if ($user->{sb_template}) {