From 72f6c2ea2d49268228356d743a9d79fdd652c10a Mon Sep 17 00:00:00 2001 From: Derf Null Date: Thu, 18 May 2023 08:25:19 +0200 Subject: fix pride ICE not being indicated in public status card --- lib/Travelynx.pm | 6 ++++++ templates/_checked_in.html.ep | 4 +++- templates/_public_status_card.html.ep | 17 +++++++++++------ 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm index 1b81f88..c594e96 100755 --- a/lib/Travelynx.pm +++ b/lib/Travelynx.pm @@ -1178,6 +1178,12 @@ sub startup { wagons => [@wagons], } ); + if ( $group->{fahrzeuggruppebezeichnung} + and $group->{fahrzeuggruppebezeichnung} eq + 'ICE0304' ) + { + $data->{wagonorder_pride} = 1; + } } $self->in_transit->update_data( uid => $uid, diff --git a/templates/_checked_in.html.ep b/templates/_checked_in.html.ep index 0ead240..b8c8c6b 100644 --- a/templates/_checked_in.html.ep +++ b/templates/_checked_in.html.ep @@ -3,7 +3,9 @@
- Eingecheckt in <%= $journey->{train_type} %> <%= $journey->{train_no} %> + + Eingecheckt in <%= $journey->{train_type} %> <%= $journey->{train_no} %> + % if ($journey->{comment}) {

<%= $journey->{comment} %>

% } diff --git a/templates/_public_status_card.html.ep b/templates/_public_status_card.html.ep index e08775c..94ebf44 100644 --- a/templates/_public_status_card.html.ep +++ b/templates/_public_status_card.html.ep @@ -12,12 +12,17 @@

„<%= $journey->{comment} %>“

% }

- % if ($journey->{train_line}) { -

<%= $journey->{train_type} %> <%= $journey->{train_line} %> <%= $journey->{train_no} %>
- % } - % else { -
<%= $journey->{train_type} %> <%= $journey->{train_no} %>
- % } +
+ % if ($journey->{train_line}) { + <%= $journey->{train_type} %> <%= $journey->{train_line} %> <%= $journey->{train_no} %> + % } + % else { + <%= $journey->{train_type} %> <%= $journey->{train_no} %> + % } + % if ($journey->{extra_data}{wagonorder_pride}) { + 🏳️‍🌈 + % } +