diff options
-rwxr-xr-x | lib/Travelynx.pm | 2 | ||||
-rw-r--r-- | lib/Travelynx/Model/Users.pm | 2 | ||||
-rw-r--r-- | templates/_checked_in.html.ep | 4 |
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}) { |