summaryrefslogtreecommitdiff
path: root/templates/departures.html.ep
diff options
context:
space:
mode:
Diffstat (limited to 'templates/departures.html.ep')
-rw-r--r--templates/departures.html.ep32
1 files changed, 24 insertions, 8 deletions
diff --git a/templates/departures.html.ep b/templates/departures.html.ep
index 16b5f3c..0d57039 100644
--- a/templates/departures.html.ep
+++ b/templates/departures.html.ep
@@ -81,14 +81,7 @@
</div>
</div>
% }
-% elsif ($user_status->{timestamp_delta} < 180) {
- <div class="row">
- <div class="col s12">
- %= include '_checked_out', journey => $user_status;
- </div>
- </div>
-% }
-% elsif (not param('train') and (@{stash('connections_iris') // []} or @{stash('connections_hafas') // []}) ) {
+% elsif (not param('train') and (@{stash('connections_iris') // []} or @{stash('connections_hafas') // []} or @{stash('suggestions') // []}) ) {
% $have_connections = 1;
<div class="row">
<div class="col s12">
@@ -99,6 +92,21 @@
% if (@{stash('connections_hafas') // []}) {
%= include '_connections_hafas', connections => stash('connections_hafas'), 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;
+ % }
+ % }
+ </div>
+ </div>
+% }
+% if (not $user_status->{checked_in} and $user_status->{timestamp_delta} < 180) {
+ <div class="row">
+ <div class="col s12">
+ %= include '_checked_out', journey => $user_status;
</div>
</div>
% }
@@ -190,3 +198,11 @@
% }
</div>
</div>
+
+% if (not $user_status->{checked_in}) {
+ <div class="row">
+ <div class="col s12 center-align">
+ <a class="btn-small" href="<%= url_for('checkinadd')->query({dbris => $dbris, efa => $efa, hafas => $hafas, motis => $motis, dep_station => $station}) %>"><i class="material-icons left" aria-hidden="true">add</i><span>manuell einchecken</span></a>
+ </div>
+ </div>
+% }