summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2025-03-23 18:29:37 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2025-03-23 18:29:37 +0100
commit065604811827818e547082cf075d4e9432f4f99a (patch)
treefb370d3cda40ca5d9589d55dec6492d6ecfab111
parentf290638934800a2508360a066dbde7a8dcf938e2 (diff)
landingpage / geolocation fallback: support dbris
-rw-r--r--public/static/js/geolocation.js2
-rw-r--r--templates/landingpage.html.ep2
2 files changed, 2 insertions, 2 deletions
diff --git a/public/static/js/geolocation.js b/public/static/js/geolocation.js
index a496900..c428acd 100644
--- a/public/static/js/geolocation.js
+++ b/public/static/js/geolocation.js
@@ -24,7 +24,7 @@ $(document).ready(function() {
const res = $(document.createElement('p'));
$.each(stops, function(i, stop) {
const parts = stop.split(';');
- const node = $('<a class="tablerow" href="/s/' + parts[0] + '?hafas=' + parts[2] + '"><span><i class="material-icons" aria-hidden="true">' + (parts[2] == '0' ? 'train' : 'directions') + '</i>' + parts[1] + '</span></a>');
+ const node = $('<a class="tablerow" href="/s/' + parts[0] + '?dbris=' + parts[2] + '&amp;hafas=' + parts[3] + '"><span><i class="material-icons" aria-hidden="true">' + (parts[2] == '0' ? 'train' : 'directions') + '</i>' + parts[1] + '</span></a>');
node.click(function() {
$('nav .preloader-wrapper').addClass('active');
});
diff --git a/templates/landingpage.html.ep b/templates/landingpage.html.ep
index 856fdef..0ccb1ad 100644
--- a/templates/landingpage.html.ep
+++ b/templates/landingpage.html.ep
@@ -57,7 +57,7 @@
<div class="card-content">
<span class="card-title">Hallo, <%= $user->{name} %>!</span>
<p>Du bist gerade nicht eingecheckt.</p>
- <div class="geolocation" data-recent="<%= join('|', map { $_->{eva} . ';' . $_->{name} . ';' . $_->{hafas} } @{stash('recent_targets') // []} ) %>" data-backend="<%= $user->{backend_id} %>">
+ <div class="geolocation" data-recent="<%= join('|', map { $_->{eva} . ';' . $_->{name} . ';' . $_->{dbris} . ';' . $_->{hafas} } @{stash('recent_targets') // []} ) %>" data-backend="<%= $user->{backend_id} %>">
<a class="btn waves-effect waves-light btn-flat request">Stationen in der Umgebung abfragen</a>
</div>
%= hidden_field backend_dbris => $user->{backend_dbris}