From 47f76da4f8cc31146d2834dfdf9731d330288c9d Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Fri, 26 Jul 2024 18:55:58 +0200 Subject: Multi-backend support Squashed commit of the following: commit 92518024ba295456358618c0e8180bd8e996fdf1 Author: Birte Kristina Friesel Date: Fri Jul 26 18:39:46 2024 +0200 add_or_update station: remove superfluos 'new backend id := old backend id' commit df21c20c6e4c86454f8a9ac69121404415217f2a Author: Birte Kristina Friesel Date: Fri Jul 26 18:35:51 2024 +0200 revert connection targets min_count to 3 commit be335cef07d0b42874f5fc1de4a1d13396e8e807 Author: Birte Kristina Friesel Date: Fri Jul 26 18:20:05 2024 +0200 mention backend selection in API documentation commit 9f41828fb4f18fd707e0087def3032e8d4c8d7d8 Author: Birte Kristina Friesel Date: Thu Jul 25 20:19:23 2024 +0200 use_history: not all backends provide route data in departure monitor commit 09714b4d89684b8331d0e96f564a4c7432318f70 Author: Birte Kristina Friesel Date: Thu Jul 25 20:11:44 2024 +0200 disambiguation: pass correct hafas parameter commit 8cdf1120fc32155dc6525be64601b7c10a9c7f52 Author: Birte Kristina Friesel Date: Thu Jul 25 20:11:28 2024 +0200 _checked_in: hide Zuglauf link for non-db checkins commit 7455653f541198e0e0a6d11aed421487ffdb6285 Author: Birte Kristina Friesel Date: Thu Jul 25 20:01:47 2024 +0200 debug output commit b9cda07f85601a58ea32dbdacdd5399f302db52b Author: Birte Kristina Friesel Date: Thu Jul 25 19:09:07 2024 +0200 fix remaining get_connection_targets / get_connecting_trains_p invocations commit 2759d7258c37c7498905cfe19f6b4c4f6d16bd21 Author: Birte Kristina Friesel Date: Wed Jul 24 20:50:12 2024 +0200 support non-DB HAFAS backends (WiP) --- templates/_checked_in.html.ep | 9 ++++++-- templates/_checked_out.html.ep | 2 +- templates/_connections_hafas.html.ep | 3 ++- templates/_departures_hafas.html.ep | 1 + templates/api_documentation.html.ep | 6 +++++ templates/departures.html.ep | 39 ++++++++++++++++---------------- templates/disambiguation.html.ep | 2 +- templates/exception.html.ep | 11 +++++++-- templates/landingpage.html.ep | 43 ++++++++++++++++++++++-------------- templates/layouts/default.html.ep | 2 +- templates/select_backend.html.ep | 34 ++++++++++++++++++++++++++++ templates/traewelling.html.ep | 27 +++++++++------------- templates/use_history.html.ep | 6 ++++- 13 files changed, 124 insertions(+), 61 deletions(-) create mode 100644 templates/select_backend.html.ep (limited to 'templates') diff --git a/templates/_checked_in.html.ep b/templates/_checked_in.html.ep index 19a94bb..2d71d7e 100644 --- a/templates/_checked_in.html.ep +++ b/templates/_checked_in.html.ep @@ -343,9 +343,14 @@ % else { % $url = $url . $journey->{train_type} . ' ' . $journey->{train_no} . '/' . $journey->{sched_departure}->epoch . '000?station=' . $journey->{dep_eva}; % } - Zuglauf + % if ($journey->{backend_id} <= 1) { + Zuglauf + % } + % else { +   + % } % if ($journey->{extra_data}{trip_id}) { - Karte + Karte % } diff --git a/templates/_checked_out.html.ep b/templates/_checked_out.html.ep index 5a944dc..21db335 100644 --- a/templates/_checked_out.html.ep +++ b/templates/_checked_out.html.ep @@ -3,7 +3,7 @@ Ausgecheckt

Aus %= include '_format_train', journey => $journey - bis <%= $journey->{arr_name} %>

+ bis <%= $journey->{arr_name} %>

% if (@{stash('connections_iris') // [] } or @{stash('connections_hafas') // []}) { Verbindungen

Fahrt auswählen zum Einchecken mit Zielwahl.

diff --git a/templates/_connections_hafas.html.ep b/templates/_connections_hafas.html.ep index dcf7ec9..43198e2 100644 --- a/templates/_connections_hafas.html.ep +++ b/templates/_connections_hafas.html.ep @@ -1,6 +1,6 @@
    % for my $res (@{$connections}) { - % my ($train, $via, $via_arr) = @{$res}; + % my ($train, $via, $via_arr, $hafas_service) = @{$res}; % $via_arr = $via_arr ? $via_arr->strftime('%H:%M') : q{}; % my $row_class = ''; % my $link_class = 'action-checkin'; @@ -10,6 +10,7 @@ % } % if ($checkin_from) {