diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2011-09-05 11:47:01 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2011-09-05 11:47:01 +0100 |
commit | 256b548eb0120d9223bd74ded46a850fd724f695 (patch) | |
tree | fed3f0b97a681dbcb521d061e80ff4ccd3784cbd | |
parent | fe207017853c89e7b3f17d937a75a42a0e482872 (diff) |
Style changes to public body page (move search controls higher up page, clarify what the results are and that you can filter them, make it clearer what this page is for)
-rw-r--r-- | app/views/public_body/show.rhtml | 23 | ||||
-rw-r--r-- | app/views/request/_request_filter_form.rhtml | 38 | ||||
-rw-r--r-- | public/stylesheets/theme.css | 12 |
3 files changed, 46 insertions, 27 deletions
diff --git a/app/views/public_body/show.rhtml b/app/views/public_body/show.rhtml index 2aab549b6..b6e0c68b2 100644 --- a/app/views/public_body/show.rhtml +++ b/app/views/public_body/show.rhtml @@ -27,6 +27,7 @@ </div> <div id="header_left"> + <p class="public-body-name-prefix">Freedom of information requests to</p> <h1><%=h(@public_body.name)%></h1> <p class="subtitle"> @@ -51,7 +52,7 @@ <% if @public_body.eir_only? %> Make a new <strong>Environmental Information</strong> request <% else %> - Make a new <strong>Freedom of Information</strong> request + Make a new <strong>Freedom of Information</strong> request to <%=h(@public_body.name)%> <% end %> <%= _('<a class="link_button_green" href="{{url}}">{{text}}</a>', :url=>new_request_to_body_url(:url_name => @public_body.url_name), :text=>_("Start"))%> <% elsif @public_body.has_notes? %> @@ -66,9 +67,7 @@ <% end %> </div> </div> -</div> -<div style="clear:both"> </div> -<% if !@xapian_requests.nil? %> + <% if @public_body.info_requests.size == 0 %> <% if @public_body.eir_only? %> <h2><%= _('Environmental Information Regulations requests made using this site') %></h2> @@ -79,15 +78,26 @@ <% end %> <% else %> <h2 class="foi_results"> + <% if @public_body.eir_only? %> <%= pluralize(@public_body.info_requests.size, "Environmental Information Regulations request made using this site") %> <% else %> - <%= n_('%d Freedom of Information request made using this site', '%d Freedom of Information requests made using this site', @public_body.info_requests.size) % @public_body.info_requests.size %> + <% if @public_body.info_requests.size > 1 %> + <%= n_('Search within the %d Freedom of Information requests to %s', 'Search within the %d Freedom of Information requests made to %s', @public_body.info_requests.size) % [@public_body.info_requests.size, @public_body.name] %> + <% else %> + <%= n_('%d Freedom of Information request to %s', '%d Freedom of Information requests to %s', @public_body.info_requests.size) % [@public_body.info_requests.size, @public_body.name] %> + <% end %> <% end %> <%= @page_desc %> </h2> + <% if @public_body.info_requests.size > 1 %> + <%= render :partial => 'request/request_filter_form' %> + <% end %> + <% end %> - <%= render :partial => 'request/request_filter_form' %> +</div> +<div style="clear:both"> </div> +<% if !@xapian_requests.nil? %> <% for result in @xapian_requests.results %> <%= render :partial => 'request/request_listing_via_event', :locals => { :event => result[:model], :info_request => result[:model].info_request } %> @@ -101,7 +111,6 @@ <p> <%= _('Only requests made using {{site_name}} are shown.', :site_name => site_name) %></p> <% end %> - <% end %> <% else %> <% if @public_body.eir_only? %> <h2><%= _('Environmental Information Regulations requests made') %></h2> diff --git a/app/views/request/_request_filter_form.rhtml b/app/views/request/_request_filter_form.rhtml index b13637c25..9264540dc 100644 --- a/app/views/request/_request_filter_form.rhtml +++ b/app/views/request/_request_filter_form.rhtml @@ -1,25 +1,6 @@ <%= render :partial => 'general/localised_datepicker' %> <div id="list-filter"> - <div class="list-filter-item"> - <h3 class="title">Showing</h3> - <% statuses = [["all", _("all requests")], - ["successful", _("successful requests")], - ["unsuccessful", _("unsuccessful requests")], - ["awaiting", _("unresolved requests")]] %> - <% for status, label in statuses %> - <% if params[:view] != status %> - <% if params[:controller] == "public_body" %> - <%= link_to label, url_for(:controller => "public_body", :action => "show", :view => status, :url_name => @public_body.url_name) + "?" + request.query_string %> - <% else %> - <%= link_to label, url_for(:controller => "request", :action => "list", :view => status) + "?" + request.query_string %> - <% end %> - <% else %> - <%= label %> - <% end %> - <%= "|" unless statuses.last[0] == status %> - <% end %> - </div> <% form_tag(request.path, :method => "get", :id=>"filter_requests_form") do %> <div class="list-filter-item"> <%= label_tag(:query, _("Keywords"), :class=>"form_label title") %> @@ -44,6 +25,25 @@ <%= label_tag(:query, _("and"), :class=>"form_label") %> <%= text_field_tag(:request_date_before, params[:request_date_before], {:class => "use-datepicker", :size => 10}) %> </div> + <div class="list-filter-item"> + <h3 class="title">Showing</h3> + <% statuses = [["all", _("all requests")], + ["successful", _("successful requests")], + ["unsuccessful", _("unsuccessful requests")], + ["awaiting", _("unresolved requests")]] %> + <% for status, label in statuses %> + <% if params[:view] != status %> + <% if params[:controller] == "public_body" %> + <%= link_to label, url_for(:controller => "public_body", :action => "show", :view => status, :url_name => @public_body.url_name) + "?" + request.query_string %> + <% else %> + <%= link_to label, url_for(:controller => "request", :action => "list", :view => status) + "?" + request.query_string %> + <% end %> + <% else %> + <%= label %> + <% end %> + <%= "|" unless statuses.last[0] == status %> + <% end %> + </div> <div class="list-filter-item"> <%= submit_tag("Search") %> diff --git a/public/stylesheets/theme.css b/public/stylesheets/theme.css index 0b524fca9..6c71bb8cf 100644 --- a/public/stylesheets/theme.css +++ b/public/stylesheets/theme.css @@ -3,6 +3,7 @@ h1 { font-size: 42px; font-family: 'DeliciousBold', Arial, sans-serif; margin-bottom:15px; + margin-top:10px; } h2 a { @@ -195,6 +196,7 @@ div.lang { p.subtitle { margin-top:10px; margin-bottom:20px; + font-style: italic; } .results_section { @@ -437,12 +439,15 @@ h2.foi_results, h2.person_results, h2.publicbody_results { padding-top:0px; - border-bottom:1px solid #B3B3B3; padding-bottom:15px; margin-bottom:0px; margin-top: 0px; } +h2.foi_results { + width: 600px; +} + .list_toggle_controls { padding-bottom:20px; } @@ -892,3 +897,8 @@ body.front h3 { cursor:pointer; opacity: 1; } +p.public-body-name-prefix { + color: #DEB4D8; + margin-top: 15px; + margin-bottom: -15px; +} |