summaryrefslogtreecommitdiff
path: root/web/views/search.erb
diff options
context:
space:
mode:
Diffstat (limited to 'web/views/search.erb')
-rw-r--r--web/views/search.erb41
1 files changed, 31 insertions, 10 deletions
diff --git a/web/views/search.erb b/web/views/search.erb
index 00d276f..4226d74 100644
--- a/web/views/search.erb
+++ b/web/views/search.erb
@@ -1,13 +1,34 @@
-<h1>Search results</h1>
+<h1><%= @title %></h1>
-<p><b>You were searching for:</b> <%= @escaped_search_string %></p>
+<p><b><%= t.pages.search.results.you_were_searching_for %>:</b> <%= escape_html(@query) %></p>
-<% if ! @key.nil? %>
- <p><b>Exact match:</b> <a href="/keys/<%= h @key %>"><%= h @key %></a></p>
-<% end %>
-
-<% if @substring_keys %>
- <p><b>Keys containing this word:</b>
- <%= @substring_keys.map{ |key| "<a href='/keys/#{ h key }'>#{ h key }</a>" }.join(' &bull; ') %></p>
-<% end %>
+<div id="tabs">
+ <ul>
+ <li><a href="#keys"><%= t.osm.keys %></a></li>
+ <li><a href="#values"><%= t.osm.values %></a></li>
+ </ul>
+ <div id="keys">
+ <h2><%= t.osm.keys %></h2>
+ <table id="grid-keys">
+ </table>
+ </div>
+ <div id="values">
+ <h2><%= t.osm.values %></h2>
+ <table id="grid-values">
+ </table>
+ </div>
+</div>
+<% javascript do
+ JQuery.ready do
+ JS.raw(%Q{
+ var tabs = jQuery('#tabs').tabs({
+ show: function(event, ui) {
+ window.location.hash = ui.tab.hash;
+ create_flexigrid_for.search[ui.tab.hash.substring(1)](#{ @query.to_json });
+ }
+ });
+ })
+ end
+end
+%>