From 4dda0fd251e6c82c73cf7ae280caf1ae94d3012e Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Fri, 18 Oct 2024 19:17:10 +0200 Subject: Add preliminary EFA support --- templates/_train_details.html.ep | 8 ++++---- templates/layouts/app.html.ep | 3 ++- templates/select_backend.html.ep | 11 ++++++++--- 3 files changed, 14 insertions(+), 8 deletions(-) (limited to 'templates') diff --git a/templates/_train_details.html.ep b/templates/_train_details.html.ep index a02336b..dab05d0 100644 --- a/templates/_train_details.html.ep +++ b/templates/_train_details.html.ep @@ -2,8 +2,8 @@
% if ($departure->{train_no} or $departure->{train_line}) { <%= $departure->{train_type} %> - - <%= $departure->{train_line} // $departure->{train_no} %> + %= $departure->{train_line} // $departure->{train_no} + <%= $departure->{train_line} ? $departure->{train_no} : q{} %> % }
@@ -145,10 +145,10 @@
% if ($departure->{trip_id}) { % if (stash('station_name')) { - Karte + Karte % } % else { - Karte + Karte % } % } % if ($departure->{wr_link}) { diff --git a/templates/layouts/app.html.ep b/templates/layouts/app.html.ep index 685f31a..cc13143 100644 --- a/templates/layouts/app.html.ep +++ b/templates/layouts/app.html.ep @@ -117,6 +117,7 @@ Bitte eine Station aus der Liste auswählen
%= form_for _redirect => begin +%= hidden_field efa => param('efa') %= hidden_field hafas => param('hafas')
@@ -142,7 +143,7 @@ Bitte eine Station aus der Liste auswählen
% }
Weitere Einstellungen
diff --git a/templates/select_backend.html.ep b/templates/select_backend.html.ep index 836e5c7..2603800 100644 --- a/templates/select_backend.html.ep +++ b/templates/select_backend.html.ep @@ -14,17 +14,22 @@ <%= $prev_type %>:
% } % my $class = 'button'; - % if (param('hafas')) { + % if (param('efa')) { + % if ($backend->{efa} and $backend->{shortname} eq param('efa')) { + % $class .= ' button-active'; + % } + % } + % elsif (param('hafas')) { % if ($backend->{hafas} and $backend->{shortname} eq param('hafas')) { % $class .= ' button-active'; % } % } % else { - % if (not $backend->{hafas}) { + % if (not ($backend->{efa} or $backend->{hafas})) { % $class .= ' button-active'; % } % } - <%= $backend->{shortname} // 'IRIS-TTS' %> – <%= $backend->{name} %> + <%= $backend->{shortname} // 'IRIS-TTS' %> – <%= $backend->{name} %> % if ($backend->{has_area}) { <%= join(q{, }, @{$backend->{regions}}) || '[Karte]' %> % } -- cgit v1.2.3