diff options
| author | Birte Kristina Friesel <derf@finalrewind.org> | 2025-06-15 14:43:01 +0200 | 
|---|---|---|
| committer | Birte Kristina Friesel <derf@finalrewind.org> | 2025-06-15 14:43:01 +0200 | 
| commit | cfe6a490d3ca4bdedd03e1f1f5aa80f56e212950 (patch) | |
| tree | 624622a97f86ffda5153f47e424a477918c310fc | |
| parent | 37a6a51513723fcb9169b702885a6bfbba49e807 (diff) | |
recent targets: add efa support
| -rwxr-xr-x | lib/Travelynx/Model/Journeys.pm | 5 | ||||
| -rw-r--r-- | public/static/js/geolocation.js | 4 | ||||
| -rw-r--r-- | templates/landingpage.html.ep | 2 | 
3 files changed, 6 insertions, 5 deletions
diff --git a/lib/Travelynx/Model/Journeys.pm b/lib/Travelynx/Model/Journeys.pm index 1662787..0fb663e 100755 --- a/lib/Travelynx/Model/Journeys.pm +++ b/lib/Travelynx/Model/Journeys.pm @@ -875,8 +875,8 @@ sub get_latest_checkout_stations {  			'arr_name',        'arr_eva',  			'arr_external_id', 'train_id',  			'backend_id',      'backend_name', -			'is_dbris',        'is_hafas', -			'is_motis' +			'is_dbris',        'is_efa', +			'is_hafas',        'is_motis'  		],  		{  			user_id   => $uid, @@ -903,6 +903,7 @@ sub get_latest_checkout_stations {  				external_id_or_eva => $row->{arr_external_id}  				  // $row->{arr_eva},  				dbris      => $row->{is_dbris} ? $row->{backend_name} : 0, +				efa        => $row->{is_efa}   ? $row->{backend_name} : 0,  				hafas      => $row->{is_hafas} ? $row->{backend_name} : 0,  				motis      => $row->{is_motis} ? $row->{backend_name} : 0,  				backend_id => $row->{backend_id}, diff --git a/public/static/js/geolocation.js b/public/static/js/geolocation.js index 1bb4b2b..ebe5dde 100644 --- a/public/static/js/geolocation.js +++ b/public/static/js/geolocation.js @@ -24,9 +24,9 @@ $(document).ready(function() {  			const res = $(document.createElement('p'));  			$.each(stops, function(i, stop) {  				const parts = stop.split(';'); -				const [ eva, name, dbris, motis, hafas ] = parts; +				const [ eva, name, dbris, efa, hafas, motis ] = parts; -				const node = $('<a class="tablerow" href="/s/' + eva + '?dbris=' + dbris + '&motis=' + motis + '&hafas=' + hafas + '"><span><i class="material-icons" aria-hidden="true">' + (dbris == '0' ? 'train' : 'directions') + '</i>' + name + '</span></a>'); +				const node = $('<a class="tablerow" href="/s/' + eva + '?dbris=' + dbris + '&efa=' + efa + '&hafas=' + hafas + '&motis=' + motis + '"><span><i class="material-icons" aria-hidden="true">' + (dbris == '0' ? 'train' : 'directions') + '</i>' + name + '</span></a>');  				node.click(function() {  					$('nav .preloader-wrapper').addClass('active');  				}); diff --git a/templates/landingpage.html.ep b/templates/landingpage.html.ep index 56aa8ff..5ca0e9e 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 { $_->{external_id_or_eva} . ';' . $_->{name} . ';' . $_->{dbris} . ';' . $_->{motis} . ';' . $_->{hafas} } @{stash('recent_targets') // []} ) %>" data-backend="<%= $user->{backend_id} %>"> +							<div class="geolocation" data-recent="<%= join('|', map { $_->{external_id_or_eva} . ';' . $_->{name} . ';' . $_->{dbris} . ';' . $_->{efa} . ';' . $_->{hafas} . ';' . $_->{motis} } @{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}  | 
