diff options
Diffstat (limited to 'templates/journey.html.ep')
-rw-r--r-- | templates/journey.html.ep | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/templates/journey.html.ep b/templates/journey.html.ep index 2699d4a..f9c78ec 100644 --- a/templates/journey.html.ep +++ b/templates/journey.html.ep @@ -257,11 +257,12 @@ % my $before = 1; % my $within = 0; % my $at_startstop = 0; + % my $i = 0; % for my $station (@{$journey->{route}}) { - % if (($station->[1] and $station->[1] == $journey->{from_eva}) or $station->[0] eq $journey->{from_name}) { + % if ($i == $journey->{route_dep_index}) { % $within = 1; $at_startstop = 1; % } - % elsif (($station->[1] and $station->[1] == $journey->{to_eva}) or $station->[0] eq $journey->{to_name}) { + % elsif ($i == $journey->{route_arr_index}) { % $within = 0; $at_startstop = 1; % } % else { @@ -269,10 +270,10 @@ % } <span style="color: #808080;"> % if ($before and $station->[2]{sched_dep}) { - %= $station->[2]{sched_dep}->strftime('%H:%M') + %= $station->[2]{sched_dep_dt}->strftime('%H:%M') % } % elsif (not $before and $station->[2]{sched_arr}) { - %= $station->[2]{sched_arr}->strftime('%H:%M') + %= $station->[2]{sched_arr_dt}->strftime('%H:%M') % } </span> % if ($at_startstop or $within) { @@ -298,6 +299,7 @@ % $before = 0; % } <br/> + % $i += 1; % } </td> </tr> |