From 4abc43b72e597f7c441fc2c287ed38255a1f439b Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 15 Jan 2023 16:37:32 +0100 Subject: change route/stop layout to [name, eva, {data}] --- templates/_checked_in.html.ep | 70 +++++++++++++++++------------------ templates/_public_status_card.html.ep | 36 +++++++++--------- 2 files changed, 53 insertions(+), 53 deletions(-) (limited to 'templates') diff --git a/templates/_checked_in.html.ep b/templates/_checked_in.html.ep index ec4e8ae..c994378 100644 --- a/templates/_checked_in.html.ep +++ b/templates/_checked_in.html.ep @@ -124,19 +124,19 @@ % if ($station->[0] eq $journey->{arr_name}) { % last; % } - % if (($station->[1]{rt_arr_countdown} // 0) > 0 and $station->[1]{rt_arr}) { - <%= $station->[0] %>
<%= $station->[1]{rt_arr}->strftime('%H:%M') %> - % if ($station->[1]{sched_arr} and $station->[1]{sched_arr}->epoch != $station->[1]{rt_arr}->epoch) { - %= sprintf('(%+d)', ($station->[1]{rt_arr}->epoch - $station->[1]{sched_arr}->epoch ) / 60); + % if (($station->[2]{rt_arr_countdown} // 0) > 0 and $station->[2]{rt_arr}) { + <%= $station->[0] %>
<%= $station->[2]{rt_arr}->strftime('%H:%M') %> + % if ($station->[2]{sched_arr} and $station->[2]{sched_arr}->epoch != $station->[2]{rt_arr}->epoch) { + %= sprintf('(%+d)', ($station->[2]{rt_arr}->epoch - $station->[2]{sched_arr}->epoch ) / 60); % } % last; % } - % if (($station->[1]{rt_dep_countdown} // 0) > 0 and $station->[1]{rt_arr} and $station->[1]{rt_dep}) { + % if (($station->[2]{rt_dep_countdown} // 0) > 0 and $station->[2]{rt_arr} and $station->[2]{rt_dep}) { <%= $station->[0] %>
- <%= $station->[1]{rt_arr}->strftime('%H:%M') %> → - <%= $station->[1]{rt_dep}->strftime('%H:%M') %> - % if ($station->[1]{sched_dep} and $station->[1]{sched_dep}->epoch != $station->[1]{rt_dep}->epoch) { - %= sprintf('(%+d)', ($station->[1]{rt_dep}->epoch - $station->[1]{sched_dep}->epoch ) / 60); + <%= $station->[2]{rt_arr}->strftime('%H:%M') %> → + <%= $station->[2]{rt_dep}->strftime('%H:%M') %> + % if ($station->[2]{sched_dep} and $station->[2]{sched_dep}->epoch != $station->[2]{rt_dep}->epoch) { + %= sprintf('(%+d)', ($station->[2]{rt_dep}->epoch - $station->[2]{sched_dep}->epoch ) / 60); % } % last; % } @@ -149,19 +149,19 @@ % if ($station->[0] eq $journey->{arr_name}) { % last; % } - % if (($station->[1]{rt_arr_countdown} // 0) > 0 and $station->[1]{rt_arr}) { - <%= $station->[0] %>
<%= $station->[1]{rt_arr}->strftime('%H:%M') %> - % if ($station->[1]{sched_arr} and $station->[1]{sched_arr}->epoch != $station->[1]{rt_arr}->epoch) { - %= sprintf('(%+d)', ($station->[1]{rt_arr}->epoch - $station->[1]{sched_arr}->epoch ) / 60); + % if (($station->[2]{rt_arr_countdown} // 0) > 0 and $station->[2]{rt_arr}) { + <%= $station->[0] %>
<%= $station->[2]{rt_arr}->strftime('%H:%M') %> + % if ($station->[2]{sched_arr} and $station->[2]{sched_arr}->epoch != $station->[2]{rt_arr}->epoch) { + %= sprintf('(%+d)', ($station->[2]{rt_arr}->epoch - $station->[2]{sched_arr}->epoch ) / 60); % } % last; % } - % if (($station->[1]{rt_dep_countdown} // 0) > 0 and $station->[1]{rt_arr} and $station->[1]{rt_dep}) { + % if (($station->[2]{rt_dep_countdown} // 0) > 0 and $station->[2]{rt_arr} and $station->[2]{rt_dep}) { <%= $station->[0] %>
- <%= $station->[1]{rt_arr}->strftime('%H:%M') %> → - <%= $station->[1]{rt_dep}->strftime('%H:%M') %> - % if ($station->[1]{sched_dep} and $station->[1]{sched_dep}->epoch != $station->[1]{rt_dep}->epoch) { - %= sprintf('(%+d)', ($station->[1]{rt_dep}->epoch - $station->[1]{sched_dep}->epoch ) / 60); + <%= $station->[2]{rt_arr}->strftime('%H:%M') %> → + <%= $station->[2]{rt_dep}->strftime('%H:%M') %> + % if ($station->[2]{sched_dep} and $station->[2]{sched_dep}->epoch != $station->[2]{rt_dep}->epoch) { + %= sprintf('(%+d)', ($station->[2]{rt_dep}->epoch - $station->[2]{sched_dep}->epoch ) / 60); % } % last; % } @@ -220,20 +220,20 @@ <%= $station->[0] %> - % if ($station->[1]{load}{SECOND}) { - % my ($first, $second) = load_icon($station->[1]{load}); + % if ($station->[2]{load}{SECOND}) { + % my ($first, $second) = load_icon($station->[2]{load}); % } - % if ($station->[2] and $station->[2] eq 'cancelled') { + % if ($station->[2]{isCancelled}) { entfällt % } - % elsif ($station->[1]{rt_arr} or $station->[1]{sched_arr}) { - %= ($station->[1]{rt_arr} || $station->[1]{sched_arr})->strftime('%H:%M') + % elsif ($station->[2]{rt_arr} or $station->[2]{sched_arr}) { + %= ($station->[2]{rt_arr} || $station->[2]{sched_arr})->strftime('%H:%M') % } - % elsif ($station->[1]{rt_dep} or $station->[1]{sched_dep}) { - (<%= ($station->[1]{rt_dep} || $station->[1]{sched_dep})->strftime('%H:%M') %>) + % elsif ($station->[2]{rt_dep} or $station->[2]{sched_dep}) { + (<%= ($station->[2]{rt_dep} || $station->[2]{sched_dep})->strftime('%H:%M') %>) % } - % elsif ($station->[2] and $station->[2] eq 'additional') { + % elsif ($station->[2]{isAdditional}) { Zusatzhalt % } @@ -335,26 +335,26 @@ <%= $station->[0] %> - % if ($station->[1]{load}{SECOND}) { - % my ($first, $second) = load_icon($station->[1]{load}); + % if ($station->[2]{load}{SECOND}) { + % my ($first, $second) = load_icon($station->[2]{load}); % } - % if ($station->[2] and $station->[2] eq 'cancelled') { + % if ($station->[2]{isCancelled}) { entfällt % } - % elsif ($station->[1]{rt_arr} or $station->[1]{sched_arr}) { - %= ($station->[1]{rt_arr} || $station->[1]{sched_arr})->strftime('%H:%M') + % elsif ($station->[2]{rt_arr} or $station->[2]{sched_arr}) { + %= ($station->[2]{rt_arr} || $station->[2]{sched_arr})->strftime('%H:%M') % } - % elsif ($station->[1]{rt_dep} or $station->[1]{sched_dep}) { - (<%= ($station->[1]{rt_dep} || $station->[1]{sched_dep})->strftime('%H:%M') %>) + % elsif ($station->[2]{rt_dep} or $station->[2]{sched_dep}) { + (<%= ($station->[2]{rt_dep} || $station->[2]{sched_dep})->strftime('%H:%M') %>) % } - % elsif ($station->[2] and $station->[2] eq 'additional') { + % elsif ($station->[2]{isAdditional}) { Zusatzhalt % } % if ($user->{sb_template}) { - train + train % } % } % if ($user->{sb_template}) { diff --git a/templates/_public_status_card.html.ep b/templates/_public_status_card.html.ep index acc729a..43b9926 100644 --- a/templates/_public_status_card.html.ep +++ b/templates/_public_status_card.html.ep @@ -79,19 +79,19 @@ % if ($journey->{arr_name} and $station->[0] eq $journey->{arr_name}) { % last; % } - % if (($station->[1]{rt_arr_countdown} // 0) > 0 and $station->[1]{rt_arr}) { - <%= $station->[0] %>
<%= $station->[1]{rt_arr}->strftime('%H:%M') %> - % if ($station->[1]{sched_arr} and $station->[1]{sched_arr}->epoch != $station->[1]{rt_arr}->epoch) { - %= sprintf('(%+d)', ($station->[1]{rt_arr}->epoch - $station->[1]{sched_arr}->epoch ) / 60); + % if (($station->[2]{rt_arr_countdown} // 0) > 0 and $station->[2]{rt_arr}) { + <%= $station->[0] %>
<%= $station->[2]{rt_arr}->strftime('%H:%M') %> + % if ($station->[2]{sched_arr} and $station->[2]{sched_arr}->epoch != $station->[2]{rt_arr}->epoch) { + %= sprintf('(%+d)', ($station->[2]{rt_arr}->epoch - $station->[2]{sched_arr}->epoch ) / 60); % } % last; % } - % if (($station->[1]{rt_dep_countdown} // 0) > 0 and $station->[1]{rt_arr} and $station->[1]{rt_dep}) { + % if (($station->[2]{rt_dep_countdown} // 0) > 0 and $station->[2]{rt_arr} and $station->[2]{rt_dep}) { <%= $station->[0] %>
- <%= $station->[1]{rt_arr}->strftime('%H:%M') %> → - <%= $station->[1]{rt_dep}->strftime('%H:%M') %> - % if ($station->[1]{sched_dep} and $station->[1]{sched_dep}->epoch != $station->[1]{rt_dep}->epoch) { - %= sprintf('(%+d)', ($station->[1]{rt_dep}->epoch - $station->[1]{sched_dep}->epoch ) / 60); + <%= $station->[2]{rt_arr}->strftime('%H:%M') %> → + <%= $station->[2]{rt_dep}->strftime('%H:%M') %> + % if ($station->[2]{sched_dep} and $station->[2]{sched_dep}->epoch != $station->[2]{rt_dep}->epoch) { + %= sprintf('(%+d)', ($station->[2]{rt_dep}->epoch - $station->[2]{sched_dep}->epoch ) / 60); % } % last; % } @@ -104,21 +104,21 @@ % if ($journey->{arr_name} and $station->[0] eq $journey->{arr_name}) { % last; % } - % if (($station->[1]{rt_arr_countdown} // 0) > 0 and $station->[1]{rt_arr}) { + % if (($station->[2]{rt_arr_countdown} // 0) > 0 and $station->[2]{rt_arr}) { Nächster Halt:
- <%= $station->[0] %>
<%= $station->[1]{rt_arr}->strftime('%H:%M') %> - % if ($station->[1]{sched_arr} and $station->[1]{sched_arr}->epoch != $station->[1]{rt_arr}->epoch) { - %= sprintf('(%+d)', ($station->[1]{rt_arr}->epoch - $station->[1]{sched_arr}->epoch ) / 60); + <%= $station->[0] %>
<%= $station->[2]{rt_arr}->strftime('%H:%M') %> + % if ($station->[2]{sched_arr} and $station->[2]{sched_arr}->epoch != $station->[2]{rt_arr}->epoch) { + %= sprintf('(%+d)', ($station->[2]{rt_arr}->epoch - $station->[2]{sched_arr}->epoch ) / 60); % } % last; % } - % if (($station->[1]{rt_dep_countdown} // 0) > 0 and $station->[1]{rt_arr} and $station->[1]{rt_dep}) { + % if (($station->[2]{rt_dep_countdown} // 0) > 0 and $station->[2]{rt_arr} and $station->[2]{rt_dep}) { Aktueller Halt:
<%= $station->[0] %>
- <%= $station->[1]{rt_arr}->strftime('%H:%M') %> → - <%= $station->[1]{rt_dep}->strftime('%H:%M') %> - % if ($station->[1]{sched_dep} and $station->[1]{sched_dep}->epoch != $station->[1]{rt_dep}->epoch) { - %= sprintf('(%+d)', ($station->[1]{rt_dep}->epoch - $station->[1]{sched_dep}->epoch ) / 60); + <%= $station->[2]{rt_arr}->strftime('%H:%M') %> → + <%= $station->[2]{rt_dep}->strftime('%H:%M') %> + % if ($station->[2]{sched_dep} and $station->[2]{sched_dep}->epoch != $station->[2]{rt_dep}->epoch) { + %= sprintf('(%+d)', ($station->[2]{rt_dep}->epoch - $station->[2]{sched_dep}->epoch ) / 60); % } % last; % } -- cgit v1.2.3