diff options
author | Birte Kristina Friesel <derf@finalrewind.org> | 2025-05-30 18:56:37 +0200 |
---|---|---|
committer | Birte Kristina Friesel <derf@finalrewind.org> | 2025-05-30 18:56:37 +0200 |
commit | cc6601868c722e0423a4fe461109f936e68d0494 (patch) | |
tree | 7fe2bea0b8aa1844a4c3e4feea987a7fd4cafa61 | |
parent | e9f26a6aab98d7054bd8abd4b6bceba05c54baee (diff) |
checked-in view: restore dbf.finalrewind.org carriage formation link2.12.2
-rwxr-xr-x | lib/Travelynx.pm | 10 | ||||
-rw-r--r-- | templates/_checked_in.html.ep | 4 |
2 files changed, 12 insertions, 2 deletions
diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm index efe5c07..af46e5a 100755 --- a/lib/Travelynx.pm +++ b/lib/Travelynx.pm @@ -1478,7 +1478,17 @@ sub startup { and $wr and not exists $wagonorder->{error} ) { + my $dt + = $opt{datetime}->clone->set_time_zone('UTC'); $data->{wagonorder_dep} = $wagonorder; + $data->{wagonorder_param} = { + time => $dt->rfc3339 =~ s{(?=Z)}{.000}r, + number => $opt{train_no}, + evaNumber => $opt{eva}, + administrationId => 80, + date => $dt->strftime('%Y-%m-%d'), + category => $opt{train_type}, + }; $user_data->{wagongroups} = []; for my $group ( $wr->groups ) { my @wagons; diff --git a/templates/_checked_in.html.ep b/templates/_checked_in.html.ep index 92d9593..016e56b 100644 --- a/templates/_checked_in.html.ep +++ b/templates/_checked_in.html.ep @@ -68,7 +68,7 @@ % } % if (my $wr = $journey->{wagonorder}) { <br/> - <!-- <a href="https://dbf.finalrewind.org/carriage-formation?<%= $journey->{train_no} %>/<%= $journey->{sched_departure}->strftime('%Y%m%d%H%M') %>?e=<%= $journey->{dep_direction} // q{} %>"> --> + <a href="https://dbf.finalrewind.org/carriage-formation?<%= join('&', map { $_ . '=' . $journey->{extra_data}{wagonorder_param}{$_} } sort keys %{$journey->{extra_data}{wagonorder_param}}) %>&e=<%= $journey->{dep_direction} // q{} %>"> % my $direction = $wr->direction == 100 ? '→' : '←'; % my $rev = 0; % if ($journey->{dep_direction}) { @@ -111,7 +111,7 @@ % } % } %= $direction - <!-- </a> --> + </a> % } </div> <div class="progress" style="height: 1ex;"> |