summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2023-01-15 16:37:32 +0100
committerDaniel Friesel <derf@finalrewind.org>2023-01-15 16:37:32 +0100
commit4abc43b72e597f7c441fc2c287ed38255a1f439b (patch)
treef02d83b69808ae0eee646dce978f2907d7488ab4 /templates
parentf198c96e308d6e1a5cb20ae2258befefb1254517 (diff)
change route/stop layout to [name, eva, {data}]
Diffstat (limited to 'templates')
-rw-r--r--templates/_checked_in.html.ep70
-rw-r--r--templates/_public_status_card.html.ep36
2 files changed, 53 insertions, 53 deletions
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] %><br/><%= $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] %><br/><%= $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] %><br/>
- <%= $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] %><br/><%= $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] %><br/><%= $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] %><br/>
- <%= $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 @@
<a class="tablerow action-checkout" data-station="<%= $station->[0] %>">
<span><%= $station->[0] %></span>
<span>
- % 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});
<i class="material-icons tiny" aria-hidden="true"><%= $first %></i> <i class="material-icons tiny" aria-hidden="true"><%= $second %></i>
% }
- % 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
% }
</span>
@@ -335,26 +335,26 @@
<a class="action-checkout tablerow" style="<%= $is_dest? 'font-weight: bold;' : '' %>" data-station="<%= $station->[0] %>">
<span><%= $station->[0] %></span>
<span>
- % 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});
<i class="material-icons tiny" aria-hidden="true"><%= $first %></i> <i class="material-icons tiny" aria-hidden="true"><%= $second %></i>
% }
- % 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
% }
</span>
</a>
% if ($user->{sb_template}) {
- <a class="nonflex" href="<%= resolve_sb_template($user->{sb_template}, name => $station->[0], eva => $station->[1]{eva}, tt => $journey->{train_type} // q{x}, tn => $journey->{train_no}, id => $journey->{train_id}) %>"><i class="material-icons tiny">train</i></a>
+ <a class="nonflex" href="<%= resolve_sb_template($user->{sb_template}, name => $station->[0], eva => $station->[1], tt => $journey->{train_type} // q{x}, tn => $journey->{train_no}, id => $journey->{train_id}) %>"><i class="material-icons tiny">train</i></a>
% }
% }
% 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] %><br/><%= $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] %><br/><%= $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] %><br/>
- <%= $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:<br/>
- <%= $station->[0] %><br/><%= $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] %><br/><%= $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:<br/>
<%= $station->[0] %><br/>
- <%= $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;
% }