diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-05-26 20:31:09 +0200 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-05-26 20:31:09 +0200 |
commit | da0a8d4461c0d4449477e1b7a188669d496a09d1 (patch) | |
tree | e0190832474daa266a460f45a886a07219c5a3a7 /templates | |
parent | 596f6deb1adef4200ddb3df4f02e6e98525a33a6 (diff) |
Show timestamps for train routes2.1.0
Diffstat (limited to 'templates')
-rw-r--r-- | templates/_train_details.html.ep | 84 |
1 files changed, 40 insertions, 44 deletions
diff --git a/templates/_train_details.html.ep b/templates/_train_details.html.ep index b1dfd13..cdadaa0 100644 --- a/templates/_train_details.html.ep +++ b/templates/_train_details.html.ep @@ -80,15 +80,40 @@ % } % } +% if ($departure->{moreinfo} and @{$departure->{moreinfo}}) { + Meldungen: + <ul> +% for my $pair (@{$departure->{moreinfo}}) { + <li> +% if ($pair->[0]->isa('DateTime')) { +% if ($pair->[0]->day != $dt_now->day) { +% $pair->[0]->set_locale('de_DE'); +%= $pair->[0]->strftime('%a %H:%M') +% } +% else { +%= $pair->[0]->strftime('%H:%M') +% } +% } +% else { +%= $pair->[0] +% } + : + <span class="reason"> +%= $pair->[1] + </span> + </li> +% } +% if ($departure->{route_info}) { + <li><%= $departure->{route_info} %></li> +% } + </ul> +% } % if ($departure->{route_pre_diff} and $departure->{route_post_diff}) { % if (@{$departure->{route_pre_diff}}) { - <div class="mroute"> - Von: -% my $first = 0; + Von: + <ul class="mroute"> % for my $stop (@{$departure->{route_pre_diff}}) { -% if ($first++) { - <span class="separator">–</span> -% } + <li> <a href="/<%= $stop->{name} %>#<%= $departure->{train_type} . $departure->{train_no} %>" class=" % if ($stop->{isAdditional}) { additional-stop @@ -102,18 +127,16 @@ % else { generic-stop % } - "><%= $stop->{name} %></a> + "><%= $stop->{dep} // q{} %> <%= $stop->{name} %></a> + </li> % } - </div> <!-- mroute --> + </ul> <!-- mroute --> % } % if (@{$departure->{route_post_diff}}) { - <div class="mroute"> - Nach: -% my $first = 0; + Nach: + <ul class="mroute"> % for my $stop (@{$departure->{route_post_diff}}) { -% if ($first++) { - <span class="separator">–</span> -% } + <li> <a href="/<%= $stop->{name} %>#<%= $departure->{train_type} . $departure->{train_no} %>" class=" % if ($stop->{isAdditional}) { additional-stop @@ -127,37 +150,10 @@ % else { generic-stop % } - "><%= $stop->{name} %></a> + "><%= $stop->{arr} // q{} %> <%= $stop->{name} %></a> + </li> % } - </div> <!-- mroute --> + </ul> <!-- mroute --> % } % } -% if ($departure->{moreinfo} and @{$departure->{moreinfo}}) { - Meldungen: - <ul> -% for my $pair (@{$departure->{moreinfo}}) { - <li> -% if ($pair->[0]->isa('DateTime')) { -% if ($pair->[0]->day != $dt_now->day) { -% $pair->[0]->set_locale('de_DE'); -%= $pair->[0]->strftime('%a %H:%M') -% } -% else { -%= $pair->[0]->strftime('%H:%M') -% } -% } -% else { -%= $pair->[0] -% } - : - <span class="reason"> -%= $pair->[1] - </span> - </li> -% } -% if ($departure->{route_info}) { - <li><%= $departure->{route_info} %></li> -% } - </ul> -% } </div> <!-- mfooter --> |