aboutsummaryrefslogtreecommitdiffstats
path: root/app/views/public_body
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/public_body')
-rw-r--r--app/views/public_body/list.rhtml11
-rw-r--r--app/views/public_body/show.rhtml10
2 files changed, 16 insertions, 5 deletions
diff --git a/app/views/public_body/list.rhtml b/app/views/public_body/list.rhtml
index 5d88b1501..c8a89ed3a 100644
--- a/app/views/public_body/list.rhtml
+++ b/app/views/public_body/list.rhtml
@@ -38,14 +38,19 @@
<h1><%=@title%></h1>
+<% form_tag(request.url, :method => "get") do %>
+ <div>
+ <%= label_tag(:public_body_query, _("Search:")) %>
+ <%= text_field_tag(:public_body_query, params[:public_body_query]) %>
+ <%= submit_tag(_("Search")) %>
+ </div>
+<% end %>
+
<p class="subtitle">
<%= @public_bodies.size %> <%= _('in total') %>
(<%= _('<a href="%s">can\'t find the one you want?</a>') % [help_requesting_path + '#missing_body'] %>)
</p>
-<% if @tag.size == 1 %>
- <p><%= render :partial => 'alphabet' %></p>
-<% end %>
<%= render :partial => 'body_listing', :locals => { :public_bodies => @public_bodies } %>
<% if @tag.size == 1 && @public_bodies.size > 0 %>
<p><%= render :partial => 'alphabet' %></p>
diff --git a/app/views/public_body/show.rhtml b/app/views/public_body/show.rhtml
index 36bba8851..1151b9966 100644
--- a/app/views/public_body/show.rhtml
+++ b/app/views/public_body/show.rhtml
@@ -64,7 +64,7 @@
</div>
<% if !@xapian_requests.nil? %>
- <% if @xapian_requests.results.empty? %>
+ <% if @public_body.info_requests.size == 0 %>
<% if @public_body.eir_only? %>
<h2><%= _('Environmental Information Regulations requests made using this site') %></h2>
<p>Nobody has made any Environmental Information Regulations requests to <%=h(@public_body.name)%> using this site yet.</p>
@@ -82,13 +82,19 @@
<%= @page_desc %>
</h2>
+ <%= render :partial => 'request/request_filter_form' %>
+
<% for result in @xapian_requests.results %>
<%= render :partial => 'request/request_listing_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %>
<% end %>
<%= will_paginate WillPaginate::Collection.new(@page, @per_page, @public_body.info_requests.size) %>
- <p> <%= _('Only requests made using {{site_name}} are shown.', :site_name => site_name) %></p>
+ <% if @xapian_requests.results.empty? %>
+ <p><% _('There were no requests matching your query.') %></p>
+ <% else %>
+ <p> <%= _('Only requests made using {{site_name}} are shown.', :site_name => site_name) %></p>
+ <% end %>
<% end %>
<% else %>