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.ep18
1 files changed, 12 insertions, 6 deletions
diff --git a/templates/departures.html.ep b/templates/departures.html.ep
index a86a7b5..6e2a98a 100644
--- a/templates/departures.html.ep
+++ b/templates/departures.html.ep
@@ -9,7 +9,10 @@
</div>
<div class="col s4 center-align">
% my $self_link = url_for('sstation', station => $station // param('station'));
- % if (param('hafas')) {
+ % if (param('dbris')) {
+ <a href="/account/select_backend?redirect_to=<%= $self_link %>" class="btn-small btn-flat"><i class="material-icons left" aria-hidden="true">directions</i><%= param('dbris') %></a>
+ % }
+ % elsif (param('hafas')) {
<a href="/account/select_backend?redirect_to=<%= $self_link %>" class="btn-small btn-flat"><i class="material-icons left" aria-hidden="true">directions</i><%= param('hafas') %></a>
% }
% else {
@@ -93,8 +96,8 @@
<div class="row">
<div class="col s4 center-align">
- % if ($hafas) {
- <a class="btn-small" href="<%= url_for('sstation', station => param('station'))->query({hafas => $hafas, timestamp => $datetime->clone->subtract(hours => 1)->epoch}) %>"><i class="material-icons left" aria-hidden="true">chevron_left</i><span class="hide-on-small-only">früher</span></a>
+ % if ($dbris or $hafas) {
+ <a class="btn-small" href="<%= url_for('sstation', station => param('station'))->query({dbris => $dbris, hafas => $hafas, timestamp => $datetime->clone->subtract(hours => 1)->epoch}) %>"><i class="material-icons left" aria-hidden="true">chevron_left</i><span class="hide-on-small-only">früher</span></a>
% }
</div>
<div class="col s4 center-align">
@@ -103,8 +106,8 @@
% }
</div>
<div class="col s4 center-align">
- % if ($hafas) {
- <a class="btn-small" href="<%= url_for('sstation', station => param('station'))->query({hafas => $hafas, timestamp => $datetime->clone->add(hours => 1)->epoch}) %>"><span class="hide-on-small-only">später</span><i class="material-icons right" aria-hidden="true">chevron_right</i></a>
+ % if ($dbris or $hafas) {
+ <a class="btn-small" href="<%= url_for('sstation', station => param('station'))->query({dbris => $dbris, hafas => $hafas, timestamp => $datetime->clone->add(hours => 1)->epoch}) %>"><span class="hide-on-small-only">später</span><i class="material-icons right" aria-hidden="true">chevron_right</i></a>
% }
</div>
</div>
@@ -139,7 +142,10 @@
% }
</p>
% if (not $user_status->{checked_in} or ($can_check_out and $user_status->{arr_eva} and $user_status->{arrival_countdown} <= 0)) {
- % if ($hafas) {
+ % if ($dbris) {
+ %= include '_departures_dbris', results => $results, dbris => $dbris;
+ % }
+ % elsif ($hafas) {
%= include '_departures_hafas', results => $results, hafas => $hafas;
% }
% else {