aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/layouts/default.rhtml2
-rw-r--r--app/views/public_body/_search_ahead.rhtml2
-rw-r--r--app/views/request/_search_ahead.rhtml2
3 files changed, 5 insertions, 1 deletions
diff --git a/app/views/layouts/default.rhtml b/app/views/layouts/default.rhtml
index 675bb38de..2f8e0bf36 100644
--- a/app/views/layouts/default.rhtml
+++ b/app/views/layouts/default.rhtml
@@ -49,7 +49,7 @@
<% end %>
<% end %>
<% if @has_json %>
- <link rel="alternate" type="application/json" title="JSON version of this page" href="<%=h main_url(request.request_uri) %>.json">
+ <link rel="alternate" type="application/json" title="JSON version of this page" href="<%=h main_url(request.request_uri, '.json') %>">
<% end %>
<% if @no_crawl %>
diff --git a/app/views/public_body/_search_ahead.rhtml b/app/views/public_body/_search_ahead.rhtml
index 19c7eb4e8..436471544 100644
--- a/app/views/public_body/_search_ahead.rhtml
+++ b/app/views/public_body/_search_ahead.rhtml
@@ -1,4 +1,5 @@
<p>
+ <% if !@xapian_requests.nil? %>
<% if @xapian_requests.results.size > 0 %>
<h3><%= _('Top search results:') %></h3>
<p>
@@ -12,6 +13,7 @@
<%= render :partial => 'body_listing_single', :locals => { :public_body => result[:model] } %>
<% end %>
</div>
+ <% end %>
</p>
diff --git a/app/views/request/_search_ahead.rhtml b/app/views/request/_search_ahead.rhtml
index 9c49680c3..d0b19de7d 100644
--- a/app/views/request/_search_ahead.rhtml
+++ b/app/views/request/_search_ahead.rhtml
@@ -1,4 +1,5 @@
<div id="request_search_ahead_results">
+ <% if !@xapian_requests.nil? %>
<% if @xapian_requests.results.size > 0 %>
<h3><%= _("Possibly related requests:") %></h3>
<% end %>
@@ -9,4 +10,5 @@
<p>
<a id="body-site-search-link" target="_blank"><%= _("Or search in their website for this information.") %></a>
</p>
+ <% end %>
</div>