From e54130ad6ea805cc04db17a3f614cb4bd25ca3f0 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 24 Sep 2022 18:53:04 +0200 Subject: optionally show local transit connections as well --- templates/_checked_in.html.ep | 7 +++++++ templates/_transit_fyi.html.ep | 19 +++++++++++++++++++ templates/account.html.ep | 2 +- templates/use_history.html.ep | 24 ++++++++++++++++++++++++ 4 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 templates/_transit_fyi.html.ep (limited to 'templates') diff --git a/templates/_checked_in.html.ep b/templates/_checked_in.html.ep index 040c5de..dcf9ddc 100644 --- a/templates/_checked_in.html.ep +++ b/templates/_checked_in.html.ep @@ -200,6 +200,13 @@ % } %= include '_connections', connections => \@connections, checkin_from => $journey->{arrival_countdown} < 0 ? $journey->{arr_ds100} : undef; % } + % if (my @transit_fyi = @{stash('transit_fyi') // []}) { + Nahverkehr + % if ($journey->{arrival_countdown} < 0) { +

Nur zur Information – kein Checkin möglich.

+ % } + %= include '_transit_fyi', transit_fyi => \@transit_fyi; + % } % if (defined $journey->{arrival_countdown} and $journey->{arrival_countdown} <= 0) {

Der automatische Checkout erfolgt wegen gelegentlich veralteter diff --git a/templates/_transit_fyi.html.ep b/templates/_transit_fyi.html.ep new file mode 100644 index 0000000..42233e5 --- /dev/null +++ b/templates/_transit_fyi.html.ep @@ -0,0 +1,19 @@ + + % for my $res (@{$transit_fyi}) { + % my ($info, $via, $via_arr) = @{$res}; + % $via_arr = $via_arr ? $via_arr->strftime('%H:%M') : q{}; + + + + + % } +
+ %= $info->{line} +
+ %= $info->{departure}->strftime('%H:%M') + % if ($info->{departure_delay}) { + %= sprintf('(%+d)', $info->{departure_delay}) + % } +
+ <%= $via %>
<%= $via_arr %> +
diff --git a/templates/account.html.ep b/templates/account.html.ep index 7658237..418291c 100644 --- a/templates/account.html.ep +++ b/templates/account.html.ep @@ -61,7 +61,7 @@ Verbindungen edit - % if ($use_history & 0x03) { + % if ($use_history & 0x07) { Vorschläge aktiv % } % else { diff --git a/templates/use_history.html.ep b/templates/use_history.html.ep index e8e129f..1632b8b 100644 --- a/templates/use_history.html.ep +++ b/templates/use_history.html.ep @@ -47,6 +47,30 @@ ohne Umweg über die Abfahrtstafel möglich. +

+
+ +
+
+
+
+ Zeige beim Reisestatus zusätzlich Anschlussmöglichkeiten an den + Nahverkehr. Diese dienen lediglich zur Information; ein Checkin ist + nicht möglich. Es werden nur Anschlussmöglichkeiten zu Zielen + angezeigt, die im folgenden Feld gelistet sind (ein Ziel pro + Zeile, z.B. „Eichlinghofen H-Bahn, Dortmund“). Falls travelynx in + Zukunft eine Möglichkeit für Checkins in Nahverkehrsmittel erhält, + wird diese Liste ggf. gelöscht. +
+
+
+
+ %= text_area 'destinations', id => 'destinations', class => 'materialize-textarea' +
+
-- cgit v1.2.3