diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-10-19 10:15:18 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-10-19 10:15:18 +0200 |
commit | 780cdafcf5e7f078a880d9875f2304f52dafbf0d (patch) | |
tree | 673bbba990020341b05ee363a55304c17a34ebf1 | |
parent | daa05870fd92126e64e918fcfbcf464d5118fbed (diff) |
show related stations in departure list1.9.7
-rwxr-xr-x | lib/Travelynx.pm | 1 | ||||
-rwxr-xr-x | lib/Travelynx/Controller/Traveling.pm | 9 | ||||
-rw-r--r-- | templates/departures.html.ep | 9 |
3 files changed, 12 insertions, 7 deletions
diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm index 0c23a3a..477e19b 100755 --- a/lib/Travelynx.pm +++ b/lib/Travelynx.pm @@ -251,6 +251,7 @@ sub startup { ), station_name => ( $status->station ? $status->station->{name} : 'undef' ), + related_stations => [ $status->related_stations ], }; } elsif ( @station_matches > 1 ) { diff --git a/lib/Travelynx/Controller/Traveling.pm b/lib/Travelynx/Controller/Traveling.pm index 43730bc..eebe27a 100755 --- a/lib/Travelynx/Controller/Traveling.pm +++ b/lib/Travelynx/Controller/Traveling.pm @@ -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} ); diff --git a/templates/departures.html.ep b/templates/departures.html.ep index 9ab4340..41e71f0 100644 --- a/templates/departures.html.ep +++ b/templates/departures.html.ep @@ -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; |