summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2025-12-28 17:32:53 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2025-12-28 17:32:53 +0100
commita1b0bc8bfa848172321865c7c99f21e78b996472 (patch)
tree37a8fc84e65eea5fea44a50597d8dd989b5272ea /templates
parent8f17811e420e7eaa4a5a4c6d86e3d7c665abd945 (diff)
landing page: always show latest stops
Diffstat (limited to 'templates')
-rw-r--r--templates/landingpage.html.ep10
1 files changed, 9 insertions, 1 deletions
diff --git a/templates/landingpage.html.ep b/templates/landingpage.html.ep
index ba0433f..189fac4 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}