Simplify handling of geocoder URLs

This avoids having to build them in multiple places and also
ensures we link to what was actually searched rather than some
random string from the locale file.
This commit is contained in:
Tom Hughes 2024-06-25 17:57:38 +01:00
parent ddc252016a
commit 271384e683
4 changed files with 15 additions and 17 deletions

View file

@ -4,8 +4,7 @@
<% @sources.each do |source| %>
<h4>
<%= t(".title.results_from_html", :results_link => link_to(t(".title.#{source[:name]}"),
t(".title.#{source[:name]}_url").to_s + source[:parameters].to_s)) %>
<%= t(".title.results_from_html", :results_link => link_to(t(".title.#{source[:name]}"), source[:url].to_s)) %>
</h4>
<div class="search_results_entry mx-n3" data-href="<%= url_for @params.merge(:action => "search_#{source[:name]}") %>">
<div class="text-center loader">