diff options
author | Daniel Friesel <derf@finalrewind.org> | 2020-02-09 20:00:58 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2020-02-09 20:00:58 +0100 |
commit | eeec5faaf0a94e3d238049d34eaa24d08e57b01e (patch) | |
tree | 8c8ad7ad3e19ba30a176e63e00c12defa9ada3c0 /templates | |
parent | 5f789e9e046d80abbf57342a24f072807fbbc092 (diff) |
Include requested station in train route3.0.2
Diffstat (limited to 'templates')
-rw-r--r-- | templates/_train_details.html.ep | 133 | ||||
-rw-r--r-- | templates/layouts/app.html.ep | 2 | ||||
-rw-r--r-- | templates/layouts/legacy.html.ep | 2 |
3 files changed, 68 insertions, 69 deletions
diff --git a/templates/_train_details.html.ep b/templates/_train_details.html.ep index 4a4738d..548d2c8 100644 --- a/templates/_train_details.html.ep +++ b/templates/_train_details.html.ep @@ -50,21 +50,26 @@ (Gleiswechsel) % } </div> <!-- platforminfo --> +% my ($arr_time, $dep_time); +% if ($departure->{sched_arrival}) { +% $arr_time = $departure->{sched_arrival}; +% if ($departure->{arrival} and $departure->{arrival} ne $departure->{sched_arrival}) { +% $arr_time .= ' (heute ' . $departure->{arrival} . ')'; +% } +% } +% if ($departure->{sched_departure}) { +% $dep_time = $departure->{sched_departure}; +% if ($departure->{departure} and $departure->{departure} ne $departure->{sched_departure}) { +% $dep_time .= ' (heute ' . $departure->{departure} . ')'; +% } +% } % if (not $departure->{is_cancelled}) { <div class="timeinfo"> % if ($departure->{sched_arrival}) { - Ankunft: <%= $departure->{sched_arrival} %> -% if ($departure->{arrival} and $departure->{arrival} ne $departure->{sched_arrival}) { - (heute <%= $departure->{arrival} %>) -% } - <br/> + Ankunft: <%= $arr_time %><br/> % } % if ($departure->{sched_departure}) { - Abfahrt: <%= $departure->{sched_departure} %> -% if ($departure->{departure} and $departure->{departure} ne $departure->{sched_departure}) { - (heute <%= $departure->{departure} %>) -% } - <br/> + Abfahrt: <%= $dep_time %><br/> % } % if (not ($departure->{sched_arrival} or $departure->{sched_departure})) { Abfahrt: <%= $departure->{time} %> @@ -73,7 +78,7 @@ % } % } </div> <!-- timeinfo --> -% if ($departure->{wr_link} or ($icetype and $icetype->[1])) { +% if ($departure->{wr_link} or ($icetype and $icetype->[1] and $departure->{train_type} ne 'Bus')) { <div class="verbose"> % if ($departure->{wr_link}) { <a href="/_wr/<%= $departure->{train_no} %>/<%= $departure->{wr_link} %>">Wagenreihung</a> @@ -118,61 +123,55 @@ </ul> % } % if ($departure->{route_pre_diff} and $departure->{route_post_diff}) { -% if (@{$departure->{route_pre_diff}}) { - Von: - <ul class="mroute"> -% for my $stop (@{$departure->{route_pre_diff}}) { - <li> - <a href="/<%= $stop->{name} %>#<%= $departure->{train_type} . $departure->{train_no} %>" class=" -% if ($stop->{isAdditional}) { - additional-stop -% } -% elsif ($stop->{isCancelled}) { - cancelled-stop -% } -% elsif ($self->is_important($stop->{name})) { - important-stop -% } -% else { - generic-stop -% } -% if ($stop->{rt_dep}) { - "><%= $stop->{sched_dep}->strftime('%H:%M') %> (heute <%= $stop->{rt_dep}->strftime('%H:%M') %>) <%= $stop->{name} %></a> -% } -% else { - "><%= $stop->{sched_dep} ? $stop->{sched_dep}->strftime('%H:%M') : q{} %> <%= $stop->{name} %></a> -% } - </li> -% } - </ul> <!-- mroute --> -% } -% if (@{$departure->{route_post_diff}}) { - Nach: - <ul class="mroute"> -% for my $stop (@{$departure->{route_post_diff}}) { - <li> - <a href="/<%= $stop->{name} %>#<%= $departure->{train_type} . $departure->{train_no} %>" class=" -% if ($stop->{isAdditional}) { - additional-stop -% } -% elsif ($stop->{isCancelled}) { - cancelled-stop -% } -% elsif ($self->is_important($stop->{name})) { - important-stop -% } -% else { - generic-stop -% } -% if ($stop->{rt_arr}) { - "><%= $stop->{sched_arr}->strftime('%H:%M') %> (heute <%= $stop->{rt_arr}->strftime('%H:%M') %>) <%= $stop->{name} %></a> -% } -% else { - "><%= $stop->{sched_arr} ? $stop->{sched_arr}->strftime('%H:%M') : q{} %> <%= $stop->{name} %></a> -% } - </li> -% } - </ul> <!-- mroute --> -% } + Fahrtverlauf: + <ul class="mroute"> +% for my $stop (@{$departure->{route_pre_diff}}) { + <li> + <a href="/<%= $stop->{name} %>#<%= $departure->{train_type} . $departure->{train_no} %>" class=" +% if ($stop->{isAdditional}) { + additional-stop +% } +% elsif ($stop->{isCancelled}) { + cancelled-stop +% } +% elsif ($self->is_important($stop->{name})) { + important-stop +% } +% else { + generic-stop +% } +% if ($stop->{rt_dep}) { + "><%= $stop->{sched_dep}->strftime('%H:%M') %> (heute <%= $stop->{rt_dep}->strftime('%H:%M') %>) <%= $stop->{name} %></a> +% } +% else { + "><%= $stop->{sched_dep} ? $stop->{sched_dep}->strftime('%H:%M') : q{} %> <%= $stop->{name} %></a> +% } + </li> +% } + <li class="<%= $departure->{is_cancelled} ? 'cancelled-stop' : q{} %>"><%= $dep_time // $arr_time // q{} %> <strong><%= $station_name %></strong></li> +% for my $stop (@{$departure->{route_post_diff}}) { + <li> + <a href="/<%= $stop->{name} %>#<%= $departure->{train_type} . $departure->{train_no} %>" class=" +% if ($stop->{isAdditional}) { + additional-stop +% } +% elsif ($stop->{isCancelled}) { + cancelled-stop +% } +% elsif ($self->is_important($stop->{name})) { + important-stop +% } +% else { + generic-stop +% } +% if ($stop->{rt_arr}) { + "><%= $stop->{sched_arr}->strftime('%H:%M') %> (heute <%= $stop->{rt_arr}->strftime('%H:%M') %>) <%= $stop->{name} %></a> +% } +% else { + "><%= $stop->{sched_arr} ? $stop->{sched_arr}->strftime('%H:%M') : q{} %> <%= $stop->{name} %></a> +% } + </li> +% } + </ul> <!-- mroute --> % } </div> <!-- mfooter --> diff --git a/templates/layouts/app.html.ep b/templates/layouts/app.html.ep index f492e1c..258c6fd 100644 --- a/templates/layouts/app.html.ep +++ b/templates/layouts/app.html.ep @@ -18,7 +18,7 @@ <meta http-equiv="refresh" content="<%= $self->stash('refresh_interval') %>"/> % } - % my $av = 'v27'; # asset version + % my $av = 'v28'; # asset version %= stylesheet "/static/${av}/css/app.css" %= stylesheet "/static/${av}/css/material-icons.css" %= stylesheet "/static/${av}/css/jquery-ui.min.css" diff --git a/templates/layouts/legacy.html.ep b/templates/layouts/legacy.html.ep index 92943d4..47c4e35 100644 --- a/templates/layouts/legacy.html.ep +++ b/templates/layouts/legacy.html.ep @@ -17,7 +17,7 @@ <meta http-equiv="refresh" content="<%= $self->stash('refresh_interval') %>"/> % } - % my $av = 'v27'; # asset version + % my $av = 'v28'; # asset version %= stylesheet "/static/${av}/css/default.css" %= stylesheet "/static/${av}/css/material-icons.css" %= stylesheet "/static/${av}/css/jquery-ui.min.css" |