show wagon order before departure
This commit is contained in:
parent
6b9bf8e486
commit
36121ccffc
3 changed files with 35 additions and 0 deletions
|
@ -2264,6 +2264,7 @@ sub startup {
|
||||||
for my $station (@route) {
|
for my $station (@route) {
|
||||||
|
|
||||||
if ( $in_transit->{arr_name}
|
if ( $in_transit->{arr_name}
|
||||||
|
and @route_after
|
||||||
and $station->[0] eq $in_transit->{arr_name} )
|
and $station->[0] eq $in_transit->{arr_name} )
|
||||||
{
|
{
|
||||||
$stop_before_dest = $route_after[-1][0];
|
$stop_before_dest = $route_after[-1][0];
|
||||||
|
@ -2353,6 +2354,25 @@ sub startup {
|
||||||
|
|
||||||
$ret->{departure_countdown}
|
$ret->{departure_countdown}
|
||||||
= $ret->{real_departure}->epoch - $now->epoch;
|
= $ret->{real_departure}->epoch - $now->epoch;
|
||||||
|
|
||||||
|
if ( $ret->{departure_countdown} > 0
|
||||||
|
and $in_transit->{data}{wagonorder_dep} )
|
||||||
|
{
|
||||||
|
my $wr;
|
||||||
|
eval {
|
||||||
|
$wr
|
||||||
|
= Travel::Status::DE::DBWagenreihung->new(
|
||||||
|
from_json => $in_transit->{data}{wagonorder_dep} );
|
||||||
|
};
|
||||||
|
if ( $wr
|
||||||
|
and $wr->sections
|
||||||
|
and $wr->wagons
|
||||||
|
and defined $wr->direction )
|
||||||
|
{
|
||||||
|
$ret->{wagonorder} = $wr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( $in_transit->{real_arr_ts} ) {
|
if ( $in_transit->{real_arr_ts} ) {
|
||||||
$ret->{arrival_countdown}
|
$ret->{arrival_countdown}
|
||||||
= $ret->{real_arrival}->epoch - $now->epoch;
|
= $ret->{real_arrival}->epoch - $now->epoch;
|
||||||
|
|
|
@ -44,6 +44,16 @@
|
||||||
% if ($journey->{departure_countdown} > 0 and $journey->{dep_platform}) {
|
% if ($journey->{departure_countdown} > 0 and $journey->{dep_platform}) {
|
||||||
<br/>von Gleis <%= $journey->{dep_platform} %>
|
<br/>von Gleis <%= $journey->{dep_platform} %>
|
||||||
% }
|
% }
|
||||||
|
% if (my $wr = $journey->{wagonorder}) {
|
||||||
|
<br/>
|
||||||
|
%= $wr->direction == 100 ? '→' : '←';
|
||||||
|
% for my $wagon ($wr->wagons) {
|
||||||
|
% if (not ($wagon->is_locomotive or $wagon->is_powercar)) {
|
||||||
|
%= $wagon->number || $wagon->type
|
||||||
|
% }
|
||||||
|
% }
|
||||||
|
%= $wr->direction == 100 ? '→' : '←';
|
||||||
|
% }
|
||||||
</div>
|
</div>
|
||||||
<div class="progress" style="height: 1ex;">
|
<div class="progress" style="height: 1ex;">
|
||||||
<div class="determinate" style="width: <%= sprintf('%.2f', 100 * ($journey->{journey_completion} // 0)); %>%;"></div>
|
<div class="determinate" style="width: <%= sprintf('%.2f', 100 * ($journey->{journey_completion} // 0)); %>%;"></div>
|
||||||
|
|
|
@ -9,6 +9,11 @@
|
||||||
<i class="material-icons left">add</i> Angabe der Ausstiegsseite für
|
<i class="material-icons left">add</i> Angabe der Ausstiegsseite für
|
||||||
einzelne Züge und Zielbahnhöfe.
|
einzelne Züge und Zielbahnhöfe.
|
||||||
</p>
|
</p>
|
||||||
|
<p>
|
||||||
|
<i class="material-icons left">add</i> Angabe der Wagenreihung vor der
|
||||||
|
Abfahrt. Derzeit sind Wagenreihungen nur für Fernverkehrszüge
|
||||||
|
verfügbar.
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue