summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/_cancelled_departure.html.ep4
-rw-r--r--templates/_checked_in.html.ep19
-rw-r--r--templates/_checked_out.html.ep10
-rw-r--r--templates/_connections.html.ep76
-rw-r--r--templates/_connections_dbris.html.ep (renamed from templates/_suggestions_dbris.html.ep)30
-rw-r--r--templates/_connections_efa.html.ep (renamed from templates/_suggestions_efa.html.ep)30
-rw-r--r--templates/_connections_hafas.html.ep57
-rw-r--r--templates/_connections_iris.html.ep44
-rw-r--r--templates/_history_trains.html.ep105
-rw-r--r--templates/changelog.html.ep16
-rw-r--r--templates/departures.html.ep19
-rw-r--r--templates/history_by_month.html.ep2
-rw-r--r--templates/history_by_year.html.ep2
-rw-r--r--templates/landingpage.html.ep12
-rw-r--r--templates/layouts/default.html.ep2
-rw-r--r--templates/use_history.html.ep2
-rw-r--r--templates/year_in_review.html.ep47
17 files changed, 228 insertions, 249 deletions
diff --git a/templates/_cancelled_departure.html.ep b/templates/_cancelled_departure.html.ep
index db6cc5c..d47385a 100644
--- a/templates/_cancelled_departure.html.ep
+++ b/templates/_cancelled_departure.html.ep
@@ -5,9 +5,5 @@
in <a href="/s/<%= $journey->{dep_eva} %>"><%= $journey->{dep_name} %></a>
entfällt. Der Ausfall der Fahrt nach <%= $journey->{arr_name} %> wurde bereits dokumentiert.
</p>
- % if (my @connections = @{stash('connections_iris') // []}) {
- <p>Alternative Reisemöglichkeiten:</p>
- %= include '_connections', connections => \@connections, checkin_from => $journey->{dep_eva};
- % }
</div>
</div>
diff --git a/templates/_checked_in.html.ep b/templates/_checked_in.html.ep
index 69754e3..659abff 100644
--- a/templates/_checked_in.html.ep
+++ b/templates/_checked_in.html.ep
@@ -221,17 +221,26 @@
</ul>
</p>
% }
- % if (@{stash('connections_iris') // [] } or @{stash('connections_hafas') // []}) {
+ % if (my @suggestions = @{$journey->{extra_data}{connection_suggestions_dbris} // []}) {
<span class="card-title" style="margin-top: 2ex;">Verbindungen</span>
% if ($journey->{arrival_countdown} < 0) {
<p>Fahrt auswählen zum Einchecken mit Zielwahl.</p>
% }
- % if (@{stash('connections_iris') // [] }) {
- %= include '_connections', connections => stash('connections_iris'), checkin_from => $journey->{arrival_countdown} < 0 ? $journey->{arr_eva} : undef;
+ %= include '_connections_dbris', dbris => $journey->{backend_name}, suggestions => \@suggestions, checkin_from => $journey->{arrival_countdown} < 0 ? $journey->{arr_eva} : undef
+ % }
+ % if (my @suggestions = @{$journey->{extra_data}{connection_suggestions_efa} // []}) {
+ <span class="card-title" style="margin-top: 2ex;">Verbindungen</span>
+ % if ($journey->{arrival_countdown} < 0) {
+ <p>Fahrt auswählen zum Einchecken mit Zielwahl.</p>
% }
- % if (@{stash('connections_hafas') // [] }) {
- %= include '_connections_hafas', connections => stash('connections_hafas'), checkin_from => $journey->{arrival_countdown} < 0 ? $journey->{arr_eva} : undef;
+ %= include '_connections_efa', efa => $journey->{backend_name}, suggestions => \@suggestions, checkin_from => $journey->{arrival_countdown} < 0 ? $journey->{arr_eva} : undef
+ % }
+ % if (my @suggestions = @{$journey->{extra_data}{connection_suggestions_iris} // []}) {
+ <span class="card-title" style="margin-top: 2ex;">Verbindungen</span>
+ % if ($journey->{arrival_countdown} < 0) {
+ <p>Fahrt auswählen zum Einchecken mit Zielwahl.</p>
% }
+ %= include '_connections_iris', suggestions => \@suggestions, checkin_from => $journey->{arrival_countdown} < 0 ? $journey->{arr_eva} : undef
% }
% if (defined $journey->{arrival_countdown} and $journey->{arrival_countdown} <= 0) {
<p style="margin-top: 2ex;">
diff --git a/templates/_checked_out.html.ep b/templates/_checked_out.html.ep
index 21db335..fcac6f8 100644
--- a/templates/_checked_out.html.ep
+++ b/templates/_checked_out.html.ep
@@ -4,16 +4,6 @@
<p>Aus
%= include '_format_train', journey => $journey
bis <a href="/s/<%= $journey->{arr_eva} %>?hafas=<%= $journey->{is_hafas} ? $journey->{backend_name} : q{} %>"><%= $journey->{arr_name} %></a></p>
- % if (@{stash('connections_iris') // [] } or @{stash('connections_hafas') // []}) {
- <span class="card-title" style="margin-top: 2ex;">Verbindungen</span>
- <p>Fahrt auswählen zum Einchecken mit Zielwahl.</p>
- % if (@{stash('connections_iris') // [] }) {
- %= include '_connections', connections => stash('connections_iris'), checkin_from => $journey->{arr_eva};
- % }
- % if (@{stash('connections_hafas') // [] }) {
- %= include '_connections_hafas', connections => stash('connections_hafas'), checkin_from => $journey->{arr_eva};
- % }
- % }
</div>
<div class="card-action">
<a class="action-undo" data-id="<%= $journey->{journey_id} %>">
diff --git a/templates/_connections.html.ep b/templates/_connections.html.ep
deleted file mode 100644
index 1dd2718..0000000
--- a/templates/_connections.html.ep
+++ /dev/null
@@ -1,76 +0,0 @@
-<ul class="collection departures connections">
- % for my $res (@{$connections}) {
- % my ($train, $via, $via_arr, $load) = @{$res};
- % $via_arr = $via_arr ? $via_arr->strftime('%H:%M') : q{};
- % my $row_class = '';
- % my $link_class = 'action-checkin';
- % if ($train->is_cancelled) {
- % $row_class = 'cancelled';
- % $link_class = 'action-cancelled-from';
- % }
- % if ($checkin_from) {
- <li class="collection-item <%= $row_class %> <%= $link_class %>"
- data-station="<%= $train->station_uic %>"
- data-train="<%= $train->train_id %>"
- data-ts="<%= ($train->sched_departure // $train->departure)->epoch %>"
- data-dest="<%= $via->{name} %>">
- % }
- % else {
- <li class="collection-item <%= $row_class %>">
- % }
- <a class="dep-time" href="#">
- % if ($train->departure_is_cancelled) {
- %= $train->sched_departure->strftime('%H:%M')
- % }
- % else {
- %= $train->departure->strftime('%H:%M')
- % }
- % if ($via_arr) {
- → <%= $via_arr %>
- % }
- % if ($train->departure_delay) {
- %= sprintf('(%+d)', $train->departure_delay)
- % }
- </a>
- <span class="connect-platform-wrapper">
- % if ($train->platform) {
- <span>Gleis <%= $train->platform %></span>
- % }
- <span class="dep-line <%= $train->type // q{} %>">
- %= $train->line
- </span>
- </span>
- <span class="dep-dest">
- % if ($train->is_cancelled) {
- Fahrt nach <%= $via->{name} %> entfällt
- % }
- % else {
- %= $via->{name}
- % }
- <br/>
- % if ($load) {
- % my ($first, $second) = load_icon($load);
- <i class="material-icons tiny" aria-hidden="true"><%= $first %></i> <i class="material-icons tiny" aria-hidden="true"><%= $second %></i>
- % }
- % if ($train->{interchange_icon}) {
- <i class="material-icons tiny" aria-label="<%= $train->{interchange_text} %>"><%= $train->{interchange_icon} %></i>
- % }
- % if ($train->{message_id}{96} or $train->{message_id}{97}) {
- <i class="material-icons tiny" aria-label="Zug ist überbesetzt">warning</i>
- % }
- % if ($train->{message_id}{82} or $train->{message_id}{85}) {
- <i class="material-icons tiny" aria-label="Fehlende Wagen">remove</i>
- % }
- % if (($train->{message_id}{73} or $train->{message_id}{74} or $train->{message_id}{75} or $train->{message_id}{76} or $train->{message_id}{80}) and not $train->{message_id}{84}) {
- <i class="material-icons tiny" aria-label="Abweichende Wagenreihung">compare_arrows</i>
- % }
- % if ($train->{message_id}{83} or $train->{message_id}{93} or $train->{message_id}{95}) {
- <i class="material-icons tiny" aria-label="Eingeschränkte Barrierefreiheit">info_outline</i>
- % }
- % if ($train->{message_id}{70} or $train->{message_id}{71}) {
- <i class="material-icons tiny" aria-label="Ohne WLAN">portable_wifi_off</i>
- % }
- </span>
- </li>
- % }
-</ul>
diff --git a/templates/_suggestions_dbris.html.ep b/templates/_connections_dbris.html.ep
index 175a57b..8fedf84 100644
--- a/templates/_suggestions_dbris.html.ep
+++ b/templates/_connections_dbris.html.ep
@@ -3,47 +3,47 @@
% my ($dep, $dest) = @{$res};
% my $row_class = '';
% my $link_class = 'action-checkin';
- % if ($dep->is_cancelled) {
+ % if ($dep->{is_cancelled}) {
% $row_class = 'cancelled';
% $link_class = 'action-cancelled-from';
% }
% if ($checkin_from) {
<li class="collection-item <%= $row_class %> <%= $link_class %>"
data-dbris="<%= $dbris %>"
- data-station="<%= $dep->stop_eva %>"
- data-train="<%= $dep->id %>"
- data-suffix="<%= $dep->maybe_line_no %>"
- data-ts="<%= ($dep->sched_dep // $dep->dep)->epoch %>"
+ data-station="<%= $dep->{stop_eva} %>"
+ data-train="<%= $dep->{id} %>"
+ data-suffix="<%= $dep->{maybe_line_no} %>"
+ data-ts="<%= $dep->{ts} %>"
data-dest="<%= $dest->{name} %>">
% }
% else {
<li class="collection-item <%= $row_class %>">
% }
<a class="dep-time" href="#">
- % if ($dep->is_cancelled) {
- %= $dep->sched_dep->strftime('%H:%M')
+ % if ($dep->{is_cancelled}) {
+ %= $dep->{sched_hhmm}
% }
% else {
- %= $dep->dep->strftime('%H:%M')
+ %= $dep->{rt_hhmm}
% }
- % if ($dep->delay) {
- %= sprintf('(%+d)', $dep->delay)
+ % if ($dep->{delay}) {
+ %= sprintf('(%+d)', $dep->{delay})
% }
</a>
<span class="connect-platform-wrapper">
- % if ($dep->platform) {
+ % if ($dep->{platform}) {
<span>
- % if (($dep->type // q{}) =~ m{ ast | bus | ruf }ix) {
+ % if (($dep->{type} // q{}) =~ m{ ast | bus | ruf }ix) {
Steig
% }
% else {
Gleis
% }
- %= $dep->platform
+ %= $dep->{platform}
</span>
% }
- <span class="dep-line <%= $dep->type // q{} %>">
- %= $dep->line
+ <span class="dep-line <%= $dep->{type} // q{} %>">
+ %= $dep->{line}
</span>
</span>
<span class="dep-dest">
diff --git a/templates/_suggestions_efa.html.ep b/templates/_connections_efa.html.ep
index bca5d74..4800adb 100644
--- a/templates/_suggestions_efa.html.ep
+++ b/templates/_connections_efa.html.ep
@@ -3,49 +3,49 @@
% my ($dep, $dest, $via_arr) = @{$res};
% my $row_class = '';
% my $link_class = 'action-checkin';
- % if ($dep->is_cancelled) {
+ % if ($dep->{is_cancelled}) {
% $row_class = 'cancelled';
% $link_class = 'action-cancelled-from';
% }
% if ($checkin_from) {
<li class="collection-item <%= $row_class %> <%= $link_class %>"
data-efa="<%= $efa %>"
- data-station="<%= $dep->stop_id_num %>"
- data-train="<%= $dep->id %>"
- data-ts="<%= ($dep->sched_datetime // $dep->datetime)->epoch %>"
+ data-station="<%= $dep->{stop_id_num} %>"
+ data-train="<%= $dep->{id} %>"
+ data-ts="<%= $dep->{ts} %>"
data-dest="<%= $dest->{name} %>">
% }
% else {
<li class="collection-item <%= $row_class %>">
% }
<a class="dep-time" href="#">
- % if ($dep->is_cancelled) {
- %= $dep->sched_datetime->strftime('%H:%M')
+ % if ($dep->{is_cancelled}) {
+ %= $dep->{sched_hhmm}
% }
% else {
- %= $dep->datetime->strftime('%H:%M')
+ %= $dep->{rt_hhmm}
% }
% if ($via_arr) {
- → <%= $via_arr->strftime('%H:%M') %>
+ → <%= $via_arr %>
% }
- % if ($dep->delay) {
- %= sprintf('(%+d)', $dep->delay)
+ % if ($dep->{delay}) {
+ %= sprintf('(%+d)', $dep->{delay})
% }
</a>
<span class="connect-platform-wrapper">
- % if ($dep->platform) {
+ % if ($dep->{platform}) {
<span>
- % if (($dep->type // q{}) =~ m{ ast | bus | ruf }ix) {
+ % if (($dep->{type} // q{}) =~ m{ ast | bus | ruf }ix) {
Steig
% }
% else {
Gleis
% }
- %= $dep->platform
+ %= $dep->{platform}
</span>
% }
- <span class="dep-line <%= ($dep->type // q{}) =~ tr{a-zA-Z_-}{}cdr %>">
- %= $dep->line
+ <span class="dep-line <%= ($dep->{type} // q{}) =~ tr{a-zA-Z_-}{}cdr %>">
+ %= $dep->{line}
</span>
</span>
<span class="dep-dest">
diff --git a/templates/_connections_hafas.html.ep b/templates/_connections_hafas.html.ep
deleted file mode 100644
index 3b995b5..0000000
--- a/templates/_connections_hafas.html.ep
+++ /dev/null
@@ -1,57 +0,0 @@
-<ul class="collection departures connections">
- % for my $res (@{$connections}) {
- % 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';
- % if ($train->is_cancelled) {
- % $row_class = 'cancelled';
- % $link_class = 'action-cancelled-from';
- % }
- % if ($checkin_from) {
- <li class="collection-item <%= $row_class %> <%= $link_class %>"
- data-hafas="<%= $hafas_service %>"
- data-station="<%= $train->station_eva %>"
- data-train="<%= $train->id %>"
- data-ts="<%= ($train->sched_datetime // $train->datetime)->epoch %>"
- data-dest="<%= $via->{name} %>">
- % }
- % else {
- <li class="collection-item <%= $row_class %>">
- % }
- <a class="dep-time" href="#">
- % if ($train->is_cancelled) {
- %= $train->sched_datetime->strftime('%H:%M')
- % }
- % else {
- %= $train->datetime->strftime('%H:%M')
- % }
- % if ($via_arr) {
- → <%= $via_arr %>
- % }
- % if ($train->delay) {
- %= sprintf('(%+d)', $train->delay)
- % }
- </a>
- <span class="connect-platform-wrapper">
- % if ($train->platform) {
- <span>
- % if (($train->type // q{}) =~ m{ ast | bus | ruf }ix) {
- Steig
- % }
- % else {
- Gleis
- % }
- %= $train->platform
- </span>
- % }
- <span class="dep-line <%= $train->type // q{} %>">
- %= $train->line
- </span>
- </span>
- <span class="dep-dest">
- %= $via->{name}
- </span>
- </li>
- % }
-</ul>
diff --git a/templates/_connections_iris.html.ep b/templates/_connections_iris.html.ep
new file mode 100644
index 0000000..8ddc634
--- /dev/null
+++ b/templates/_connections_iris.html.ep
@@ -0,0 +1,44 @@
+<ul class="collection departures connections">
+ % for my $res (@{$suggestions}) {
+ % my ($train, $dest) = @{$res};
+ % my $row_class = '';
+ % my $link_class = 'action-checkin';
+ % if ($train->{departure_is_cancelled}) {
+ % $row_class = 'cancelled';
+ % $link_class = 'action-cancelled-from';
+ % }
+ % if ($checkin_from) {
+ <li class="collection-item <%= $row_class %> <%= $link_class %>"
+ data-station="<%= $train->{station_uic} %>"
+ data-train="<%= $train->{id} %>"
+ data-ts="<%= $train->{ts} %>"
+ data-dest="<%= $dest->{name} %>">
+ % }
+ % else {
+ <li class="collection-item <%= $row_class %>">
+ % }
+ <a class="dep-time" href="#">
+ % if ($train->{departure_is_cancelled}) {
+ %= $train->{sched_hhmm}
+ % }
+ % else {
+ %= $train->{rt_hhmm}
+ % }
+ % if ($train->{departure_delay}) {
+ %= sprintf('(%+d)', $train->{departure_delay})
+ % }
+ </a>
+ <span class="connect-platform-wrapper">
+ % if ($train->{platform}) {
+ <span>Gleis <%= $train->{platform} %></span>
+ % }
+ <span class="dep-line <%= $train->{type} // q{} %>">
+ %= $train->{line}
+ </span>
+ </span>
+ <span class="dep-dest">
+ %= $dest->{name}
+ </span>
+ </li>
+ % }
+</ul>
diff --git a/templates/_history_trains.html.ep b/templates/_history_trains.html.ep
index 0a9abd5..3550c79 100644
--- a/templates/_history_trains.html.ep
+++ b/templates/_history_trains.html.ep
@@ -27,44 +27,79 @@
</span>
</a>
- <ul class="route-history">
- <li>
- <i class="material-icons tiny" aria-label="nach">radio_button_unchecked</i>
-
- <a href="<%= $detail_link %>" class="unmarked">
- % if (param('cancelled') and $travel->{sched_arrival}->epoch != 0) {
- %= $travel->{sched_arrival}->strftime('%H:%M')
- % }
- % else {
- % if ($travel->{rt_arrival}->epoch == 0 and $travel->{sched_arrival}->epoch == 0) {
- <i class="material-icons">timer_off</i>
- % } else {
- %= $travel->{rt_arrival}->strftime('%H:%M');
- % if ($travel->{delay_arr} and int($travel->{delay_arr} / 60)) {
- (<%= sprintf('%+d', $travel->{delay_arr} / 60) %>)
+ <ul class="route-history route-history-<%= stash('order') // q{} %>">
+ % if (stash('order') and stash('order') eq 'asc') {
+ <li class="order-asc">
+ <i class="material-icons tiny" aria-label="von">play_circle_filled</i>
+ <a href="<%= $detail_link %>" class="unmarked">
+ % if (param('cancelled')) {
+ %= $travel->{sched_departure}->strftime('%H:%M')
+ % }
+ % else {
+ <%= $travel->{rt_departure}->strftime('%H:%M') %>
+ % if ($travel->{delay_dep} and int($travel->{delay_dep} / 60)) {
+ (<%= sprintf('%+d', $travel->{delay_dep} / 60) %>)
% }
% }
- % }
- <strong><%= $travel->{to_name} %></strong>
- </a>
- </li>
-
- <li>
- <i class="material-icons tiny" aria-label="von">play_circle_filled</i>
-
- <a href="<%= $detail_link %>" class="unmarked">
- % if (param('cancelled')) {
- %= $travel->{sched_departure}->strftime('%H:%M')
- % }
- % else {
- <%= $travel->{rt_departure}->strftime('%H:%M') %>
- % if ($travel->{delay_dep} and int($travel->{delay_dep} / 60)) {
- (<%= sprintf('%+d', $travel->{delay_dep} / 60) %>)
+ <strong><%= $travel->{from_name} %></strong>
+ </a>
+ </li>
+ <li class="order-asc">
+ <i class="material-icons tiny" aria-label="nach">radio_button_unchecked</i>
+ <a href="<%= $detail_link %>" class="unmarked">
+ % if (param('cancelled') and $travel->{sched_arrival}->epoch != 0) {
+ %= $travel->{sched_arrival}->strftime('%H:%M')
% }
- % }
- <strong><%= $travel->{from_name} %></strong>
- </a>
- </li>
+ % else {
+ % if ($travel->{rt_arrival}->epoch == 0 and $travel->{sched_arrival}->epoch == 0) {
+ <i class="material-icons">timer_off</i>
+ % } else {
+ %= $travel->{rt_arrival}->strftime('%H:%M');
+ % if ($travel->{delay_arr} and int($travel->{delay_arr} / 60)) {
+ (<%= sprintf('%+d', $travel->{delay_arr} / 60) %>)
+ % }
+ % }
+ % }
+ <strong><%= $travel->{to_name} %></strong>
+ </a>
+ </li>
+ % }
+ % else {
+ <li class="order-desc">
+ <i class="material-icons tiny" aria-label="nach">radio_button_unchecked</i>
+ <a href="<%= $detail_link %>" class="unmarked">
+ % if (param('cancelled') and $travel->{sched_arrival}->epoch != 0) {
+ %= $travel->{sched_arrival}->strftime('%H:%M')
+ % }
+ % else {
+ % if ($travel->{rt_arrival}->epoch == 0 and $travel->{sched_arrival}->epoch == 0) {
+ <i class="material-icons">timer_off</i>
+ % } else {
+ %= $travel->{rt_arrival}->strftime('%H:%M');
+ % if ($travel->{delay_arr} and int($travel->{delay_arr} / 60)) {
+ (<%= sprintf('%+d', $travel->{delay_arr} / 60) %>)
+ % }
+ % }
+ % }
+ <strong><%= $travel->{to_name} %></strong>
+ </a>
+ </li>
+ <li class="order-desc">
+ <i class="material-icons tiny" aria-label="von">play_circle_filled</i>
+ <a href="<%= $detail_link %>" class="unmarked">
+ % if (param('cancelled')) {
+ %= $travel->{sched_departure}->strftime('%H:%M')
+ % }
+ % else {
+ <%= $travel->{rt_departure}->strftime('%H:%M') %>
+ % if ($travel->{delay_dep} and int($travel->{delay_dep} / 60)) {
+ (<%= sprintf('%+d', $travel->{delay_dep} / 60) %>)
+ % }
+ % }
+ <strong><%= $travel->{from_name} %></strong>
+ </a>
+ </li>
+ % }
</ul>
</li>
% }
diff --git a/templates/changelog.html.ep b/templates/changelog.html.ep
index 042a46e..f6564cb 100644
--- a/templates/changelog.html.ep
+++ b/templates/changelog.html.ep
@@ -2,6 +2,22 @@
<div class="row">
<div class="col s12 m1 l1">
+ 2.18
+ </div>
+ <div class="col s12 m11 l11">
+ <p>
+ <i class="material-icons left" aria-label="<%= L('changelog.added') %>">add</i>
+ %= L('changelog.2-18.1')
+ </p>
+ <p>
+ <i class="material-icons left" aria-label="<%= L('changelog.bugfix') %>">build</i>
+ %= L('changelog.2-18.2')
+ </p>
+ </div>
+</div>
+
+<div class="row">
+ <div class="col s12 m1 l1">
2.17
</div>
<div class="col s12 m11 l11">
diff --git a/templates/departures.html.ep b/templates/departures.html.ep
index 0d57039..782b7c0 100644
--- a/templates/departures.html.ep
+++ b/templates/departures.html.ep
@@ -81,24 +81,19 @@
</div>
</div>
% }
-% elsif (not param('train') and (@{stash('connections_iris') // []} or @{stash('connections_hafas') // []} or @{stash('suggestions') // []}) ) {
+% elsif (not param('train') and @{stash('suggestions') // []} ) {
% $have_connections = 1;
<div class="row">
<div class="col s12">
<p>Häufig genutzte Verbindungen – Fahrt auswählen zum Einchecken mit Zielwahl</p>
- % if (@{stash('connections_iris') // []}) {
- %= include '_connections', connections => stash('connections_iris'), checkin_from => $eva;
+ % if ($dbris) {
+ %= include '_connections_dbris', suggestions => stash('suggestions'), checkin_from => $eva;
% }
- % if (@{stash('connections_hafas') // []}) {
- %= include '_connections_hafas', connections => stash('connections_hafas'), checkin_from => $eva;
+ % elsif ($efa) {
+ %= include '_connections_efa', suggestions => stash('suggestions'), checkin_from => $eva;
% }
- % if (@{stash('suggestions') // []}) {
- % if ($dbris) {
- %= include '_suggestions_dbris', suggestions => stash('suggestions'), checkin_from => $eva;
- % }
- % elsif ($efa) {
- %= include '_suggestions_efa', suggestions => stash('suggestions'), checkin_from => $eva;
- % }
+ % else {
+ %= include '_connections_iris', suggestions => stash('suggestions'), checkin_from => $eva;
% }
</div>
</div>
diff --git a/templates/history_by_month.html.ep b/templates/history_by_month.html.ep
index dec4c8b..217177b 100644
--- a/templates/history_by_month.html.ep
+++ b/templates/history_by_month.html.ep
@@ -11,5 +11,5 @@
</div>
% if (stash('journeys')) {
- %= include '_history_trains', date_format => '%d.%m.', journeys => stash('journeys');
+ %= include '_history_trains', date_format => '%d.%m.', journeys => stash('journeys'), order => 'asc';
% }
diff --git a/templates/history_by_year.html.ep b/templates/history_by_year.html.ep
index 4fe87ab..5c034b3 100644
--- a/templates/history_by_year.html.ep
+++ b/templates/history_by_year.html.ep
@@ -32,5 +32,5 @@
% }
% if (stash('journeys')) {
- %= include '_history_trains', date_format => '%d.%m.', journeys => stash('journeys');
+ %= include '_history_trains', date_format => '%d.%m.', journeys => stash('journeys'), order => 'asc';
% }
diff --git a/templates/landingpage.html.ep b/templates/landingpage.html.ep
index ba0433f..ff775250 100644
--- a/templates/landingpage.html.ep
+++ b/templates/landingpage.html.ep
@@ -57,7 +57,15 @@
<div class="card-content">
<span class="card-title"><%= L('landingpage.greeting-prefix') %> <%= $user->{name} %><%= L('landingpage.greeting-suffix') %></span>
<p><%= L('landingpage.not-checked-in') %>.</p>
- <div class="geolocation" data-recent="<%= join('|', map { $_->{external_id_or_eva} . ';' . $_->{name} . ';' . $_->{dbris} . ';' . $_->{efa} . ';' . $_->{hafas} . ';' . $_->{motis} } @{stash('recent_targets') // []} ) %>" data-backend="<%= $user->{backend_id} %>">
+ % if (@{stash('recent_targets') // []}) {
+ <p class="geolocationhint"><%= L('landingpage.recent-stops') %>:</p>
+ <p>
+ % for my $recent ( @{stash('recent_targets') // []} ) {
+ <a class="tablerow" href="/s/<%= $recent->{external_id_or_eva} %>?dbris=<%= $recent->{dbris} %>&amp;efa=<%= $recent->{efa} %>&amp;hafas=<%= $recent->{hafas} %>&amp;motis=<%= $recent->{motis} %>"><span><%= $recent->{name} %></span></a>
+ % }
+ </p>
+ % }
+ <div class="geolocation" data-backend="<%= $user->{backend_id} %>">
<a class="btn waves-effect waves-light btn-flat request"><%= L('landingpage.stop-geosearch') %></a>
</div>
%= hidden_field backend_dbris => $user->{backend_dbris}
@@ -98,7 +106,7 @@
</div>
% }
<h2 style="margin-left: 0.75rem;"><%= L('landingpage.latest-trips') %></h2>
- %= include '_history_trains', date_format => L('landingpage.date-format'), journeys => [journeys->get(uid => $user->{id}, limit => 5, with_datetime => 1)];
+ %= include '_history_trains', date_format => L('landingpage.date-format'), journeys => [journeys->get(uid => $user->{id}, limit => 5, with_datetime => 1)], order => 'desc';
% }
% else {
<div class="row">
diff --git a/templates/layouts/default.html.ep b/templates/layouts/default.html.ep
index 66a2598..107c638 100644
--- a/templates/layouts/default.html.ep
+++ b/templates/layouts/default.html.ep
@@ -13,7 +13,7 @@
% while (my ($key, $value) = each %{stash('opengraph') // {}}) {
<meta property="og:<%= $key %>" content="<%= $value %>">
% }
- % my $av = 'v102'; # asset version
+ % my $av = 'v104'; # asset version
<link rel="icon" type="image/png" href="/static/<%= $av %>/icons/icon-16x16.png" sizes="16x16">
<link rel="icon" type="image/png" href="/static/<%= $av %>/icons/icon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/static/<%= $av %>/icons/icon-96x96.png" sizes="96x96">
diff --git a/templates/use_history.html.ep b/templates/use_history.html.ep
index b02df18..2211603 100644
--- a/templates/use_history.html.ep
+++ b/templates/use_history.html.ep
@@ -2,7 +2,7 @@
<div class="row">
<div class="col s12">
<p>
- Travelynx kann bei DBRIS- und EFA-Backends anhand deiner
+ Travelynx kann bei DBRIS-, EFA- und IRIS-Backends anhand deiner
vergangenen Fahrten Verbindungen zum Einchecken vorschlagen. Fährst
zu z.B regelmäßig von Dortmund Hbf nach Essen Hbf, werden dir in
Dortmund bevorzugt Fahrten angezeigt, die Essen passieren. Bei
diff --git a/templates/year_in_review.html.ep b/templates/year_in_review.html.ep
index e21fbae..de10950 100644
--- a/templates/year_in_review.html.ep
+++ b/templates/year_in_review.html.ep
@@ -167,49 +167,68 @@
<div class="carousel-item" href="#four">
<h2>Oepsie Woepsie</h2>
% if ($review->{issue1_count}) {
- <p><strong><%= $review->{issue_percent} %></strong> aller Fahrten liefen nicht wie vorgesehen ab.<br/>
- Die häufigsten Anmerkungen waren:</p>
+ <p>
+ %= L('review.annotated-percent.pre')
+ <strong><%= $review->{issue_percent} %></strong><%= L('review.annotated-percent.post') %><br/>
+ %= L('review.top-annotations')
+ </p>
% for my $i (1 .. 3) {
% if ($review->{"issue${i}_count"}) {
<p><strong><%= $review->{"issue${i}_count"} %>×</strong> „<%= $review->{"issue${i}_text"} %>“</p>
% }
% }
% }
- <p>Lediglich <strong><%= $review->{punctual_percent_h} %></strong> der Fahrten waren pünktlich auf die Minute.</p>
+ <p>
+ %= L('review.punctual-percent.pre')
+ <strong><%= $review->{punctual_percent_h} %></strong><%= L('review.punctual-percent.post') %>
+ </p>
</div>
<div class="carousel-item" href="#five">
<h2>De trein is stukkie wukkie</h2>
<p>
% if ($review->{fgr_percent} >= 0.1) {
- <strong><%= $review->{fgr_percent_h} %></strong> deiner Fahrten hatten mindestens eine Stunde Verspätung
+ %= L('review.hour-delay-percent.pre')
+ <strong><%= $review->{fgr_percent_h} %></strong><%= L('review.hour-delay-percent.post') %>
% }
% if ($review->{cancel_count}) {
% if ($review->{fgr_percent} >= 0.1) {
- und <strong><%= $review->{cancel_count} %></strong> kamen gar nicht erst am Ziel an.
+ %= L('review.and-cancelled-percent.pre')
+ <strong><%= $review->{cancel_count} %></strong><%= L('review.and-cancelled-percent.post') %>
% }
% else {
- <strong><%= $review->{cancel_count} %></strong> deiner geplanten Fahrten sind ausgefallen.
+ %= L('review.cancelled-percent.pre')
+ <strong><%= $review->{cancel_count} %></strong><%= L('review.and-cancelled-percent.post') %>
% }
% }
</p>
% if ($review->{most_delayed_id}) {
<p>
- Mit <strong><%= $review->{most_delayed_delay_arr} %></strong> hatte <a href="/journey/<%= $review->{most_delayed_id} %>"><%= $review->{most_delayed_type} %> <%= $review->{most_delayed_lineno} %></a> <%= $review->{most_delayed_from} %> → <%= $review->{most_delayed_to} %> die größte Verspätung.
+ %= L('review.most-delayed.pre')
+ <strong><%= $review->{most_delayed_delay_arr} %></strong><%= L('review.most-delayed.mid') %>
+ <a href="/journey/<%= $review->{most_delayed_id} %>"><%= $review->{most_delayed_type} %> <%= $review->{most_delayed_lineno} %></a> <%= $review->{most_delayed_from} %> → <%= $review->{most_delayed_to} %><%= L('review.most-delayed.post') %>
</p>
% }
% if ($review->{most_delay_id}) {
<p>
- Die Fahrt mit <a href="/journey/<%= $review->{most_delay_id} %>"><%= $review->{most_delay_type} %> <%= $review->{most_delay_lineno} %></a>
- von <%= $review->{most_delay_from} %> nach <%= $review->{most_delay_to} %> verlief besonders gemächlich:
- sie dauerte <strong><%= $review->{most_delay_delta} %></strong> länger als geplant.
+ %= L('review.most-delay.pre')
+ <a href="/journey/<%= $review->{most_delay_id} %>"><%= $review->{most_delay_type} %> <%= $review->{most_delay_lineno} %></a>
+ %= L('review.most-delay.from')
+ %= $review->{most_delay_from}
+ %= L('review.most-delay.to')
+ %= $review->{most_delay_to}
+ %= L('review.most-delay.mid')
+ <strong><%= $review->{most_delay_delta} %></strong><%= L('review.most-delay.post') %>
</p>
% }
% if ($review->{most_undelay_id}) {
<p>
- In <a href="/journey/<%= $review->{most_undelay_id} %>"><%= $review->{most_undelay_type} %> <%= $review->{most_undelay_lineno} %></a>
- wurde hingegen Vmax ausgereizt und die Strecke von
- <%= $review->{most_undelay_from} %> nach <%= $review->{most_undelay_to} %>
- <strong><%= $review->{most_undelay_delta} %></strong> schneller absolviert als vorgesehen.
+ %= L('review.most-undelay.pre')
+ <a href="/journey/<%= $review->{most_undelay_id} %>"><%= $review->{most_undelay_type} %> <%= $review->{most_undelay_lineno} %></a>
+ %= L('review.most-undelay.from')
+ %= $review->{most_undelay_from}
+ %= L('review.most-undelay.to')
+ %= $review->{most_undelay_to}
+ <strong><%= $review->{most_undelay_delta} %></strong><%= L('review.most-undelay.post') %>
</p>
% }
</div>