]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/geocoder/search.html.erb
Merge remote-tracking branch 'upstream/pull/4895'
[rails.git] / app / views / geocoder / search.html.erb
index 7bc8fcd76c29cf24f41ade92e8484e6f0a4901b6..53e87b3fd6b68712b68d3bd73051978fd9d59220 100644 (file)
@@ -1,9 +1,17 @@
+<% set_title(@params[:query]) %>
+
+<%= render "sidebar_header", :title => t("site.sidebar.search_results") %>
+
 <% @sources.each do |source| %>
-  <p class="search_results_heading"><%= raw(t "geocoder.search.title.#{source}") %></p>
-  <div class="search_results_entry" id="<%= "search_#{source}" %>">
-    <%= image_tag "searching.gif", :class => "search_searching" %>
+  <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)) %>
+  </h4>
+  <div class="search_results_entry mx-n3" data-href="<%= url_for @params.merge(:action => "search_#{source[:name]}") %>">
+    <div class="text-center loader">
+      <div class="spinner-border" role="status">
+        <span class="visually-hidden"><%= t("browse.start_rjs.loading") %></span>
+      </div>
+    </div>
   </div>
-  <script type="text/javascript">
-    $("#search_<%= source %>").load("<%= raw url_for :action => "search_#{source}", :query => @query, :minlat => params[:minlat], :minlon => params[:minlon], :maxlat => params[:maxlat], :maxlon => params[:maxlon] %>");
-  </script>
 <% end %>