diff options
Diffstat (limited to 'templates/app.html.ep')
-rw-r--r-- | templates/app.html.ep | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/templates/app.html.ep b/templates/app.html.ep index 6df6b17..fda2c23 100644 --- a/templates/app.html.ep +++ b/templates/app.html.ep @@ -30,7 +30,7 @@ % $route_str .= $stop . ($via_cur < $via_max ? ' - ' : q{}); % } <li -% if (param('hafas') or param('efa')) { +% if (param('dbris') or param('hafas') or param('efa')) { data-jid="<%= $departure->{journey_id} =~ s{#}{%23}gr %>" % } data-train="<%= ($departure->{train_type} // q{}) %> <%= ($departure->{train_no} // $departure->{train} // q{}) %>" @@ -53,10 +53,13 @@ > % } % if (param('hafas')) { - <a href="/z/<%= Mojo::Util::url_escape($departure->{journey_id}) . '?hafas=' . Mojo::Util::url_escape(param('hafas')) . '&highlight=' . Mojo::Util::url_escape($departure->{station} // $station) %>"> + <a href="/z/<%= Mojo::Util::url_escape($departure->{journey_id}) . '?hafas=' . Mojo::Util::url_escape(param('hafas')) . '&highlight=' . Mojo::Util::url_escape($departure->{station} // $station) %>"> % } % elsif (param('efa')) { - <a href="/z/<%= Mojo::Util::url_escape($departure->{journey_id}) . '?efa=' . Mojo::Util::url_escape(param('efa')) . '&highlight=' . Mojo::Util::url_escape($departure->{station} // $station) %>"> + <a href="/z/<%= Mojo::Util::url_escape($departure->{journey_id}) . '?efa=' . Mojo::Util::url_escape(param('efa')) . '&highlight=' . Mojo::Util::url_escape($departure->{station} // $station) %>"> +% } +% elsif (param('dbris')) { + <a href="/z/<%= Mojo::Util::url_escape($departure->{journey_id}) . '?dbris=' . Mojo::Util::url_escape(param('dbris')) . '&highlight=' . Mojo::Util::url_escape($departure->{station} // $station) %>"> % } % else { <a href="/z/<%= Mojo::Util::url_escape(($departure->{train_type} // q{}) . ' ' . ($departure->{train_no} // $departure->{train} // q{})) . '/' . Mojo::Util::url_escape($departure->{station} // $station) %>"> @@ -104,13 +107,13 @@ </span> % } <span class="time <%= $show_realtime ? get_rt_time_class($departure) : q{} %>"> -% if ($departure->{delay} and not $departure->{is_cancelled}) { -% if ($show_realtime) { +% if ($departure->{delay} and not $departure->{is_cancelled} and not $departure->{departure_is_cancelled}) { +% if ($show_realtime and ($departure->{sched_arrival} or $departure->{sched_departure})) { % if ($departure->{delay} > ($hide_low_delay ? 4 : 0)) { - <span class="delaynorm" aria-hidden="true">+<%= $departure->{delay} %> ⇒</span> + <span class="delaynorm" aria-hidden="true"><%= $departure->{sched_departure} // $departure->{sched_arrival} %> ⇒</span> % } % elsif ($departure->{delay} < 0) { - <span class="undelaynorm" aria-hidden="true"><%= $departure->{delay} %> ⇒</span> + <span class="undelaynorm" aria-hidden="true"><%= $departure->{sched_departure} // $departure->{sched_arrival} %> ⇒</span> % } % } % else { @@ -142,7 +145,12 @@ % } % } % else { -%= $departure->{time} +% if ($departure->{is_cancelled} or $departure->{departure_is_cancelled}) { +%= $departure->{sched_departure} // $departure->{sched_arrival} // $departure->{time} +% } +% else { +%= $departure->{time} +% } % } </span> % if (($departure->{scheduled_platform} and $departure->{platform} and |