show related stations in departure list

This commit is contained in:
Daniel Friesel 2019-10-19 10:15:18 +02:00
parent daa05870fd
commit 780cdafcf5
3 changed files with 12 additions and 7 deletions

View file

@ -251,6 +251,7 @@ sub startup {
),
station_name =>
( $status->station ? $status->station->{name} : 'undef' ),
related_stations => [ $status->related_stations ],
};
}
elsif ( @station_matches > 1 ) {

View file

@ -367,10 +367,11 @@ sub station {
$self->render(
'departures',
ds100 => $status->{station_ds100},
results => \@results,
station => $status->{station_name},
title => "travelynx: $status->{station_name}",
ds100 => $status->{station_ds100},
results => \@results,
station => $status->{station_name},
related_stations => $status->{related_stations},
title => "travelynx: $status->{station_name}",
);
}
$self->mark_seen( $self->current_user->{id} );

View file

@ -1,7 +1,10 @@
<div class="row">
<div class="col s12 center-align"><b>
%= $station
</b></div>
<div class="col s12 center-align">
<b><%= $station %></b>
% for my $related_station (sort { $a->{name} cmp $b->{name} } @{$related_stations}) {
<br/><%= $related_station->{name} %>
% }
</div>
</div>
% my $status = $self->get_user_status;
% my $have_connections = 0;