diff options
author | David Cabo <david@calibea.com> | 2011-07-26 22:48:18 +0200 |
---|---|---|
committer | David Cabo <david@calibea.com> | 2011-07-26 22:48:18 +0200 |
commit | 0fc9a9de34be417f23a2392535523c044f644db2 (patch) | |
tree | f1e7a6a5d06926db742daa2f8e5f39083e197be2 | |
parent | 4313a819d56a11c3ce8c71cdd58af4f2033ba1c8 (diff) |
improved layout of special notes when creating a new request
-rw-r--r-- | app/views/request/new.rhtml | 196 | ||||
l--------- | public/asktheeu-theme | 1 | ||||
-rw-r--r-- | public/stylesheets/main.css | 6 |
3 files changed, 105 insertions, 98 deletions
diff --git a/app/views/request/new.rhtml b/app/views/request/new.rhtml index 45014b5fc..a640c7d1e 100644 --- a/app/views/request/new.rhtml +++ b/app/views/request/new.rhtml @@ -1,12 +1,12 @@ <script type="text/javascript" src="/javascripts/ba-throttle-debounce.js"></script> <script> - $(document).ready(function(){ - // Avoid triggering too often (on each keystroke) by using the debounce jQuery plugin: - // http://benalman.com/projects/jquery-throttle-debounce-plugin/ - $("#typeahead_search").keypress($.debounce( 300, function() { - $("#typeahead_response").load("<%=search_ahead_url%>?q="+encodeURI(this.value)); - })); - }); + $(document).ready(function(){ + // Avoid triggering too often (on each keystroke) by using the debounce jQuery plugin: + // http://benalman.com/projects/jquery-throttle-debounce-plugin/ + $("#typeahead_search").keypress($.debounce( 300, function() { + $("#typeahead_response").load("<%=search_ahead_url%>?q="+encodeURI(this.value)); + })); + }); </script> <% @title = _("Make an {{law_used_short}} request to '{{public_body_name}}'",:law_used_short=>h(@info_request.law_used_short),:public_body_name=>h(@info_request.public_body.name)) %> @@ -21,90 +21,90 @@ </ul></div> <% end %> -<%= foi_error_messages_for :info_request, :outgoing_message %> - -<h1><%= _('2. Ask for Information') %></h1> - -<% form_for(:info_request, @info_request, :html => { :id => 'write_form' } ) do |f| %> + <%= foi_error_messages_for :info_request, :outgoing_message %> + + <h1><%= _('2. Ask for Information') %></h1> + + <% form_for(:info_request, @info_request, :html => { :id => 'write_form' } ) do |f| %> + + <div id="request_header"> + <p> + <label class="form_label" for="info_request_public_body_id"><%= _('To:') %></label> + <span id="to_public_body"><%=h(@info_request.public_body.name)%></span> + <div class="form_item_note"> + <% if @info_request.public_body.info_requests.size > 0 %> + <%= _("Browse <a href='%s'>other requests</a> to '{{public_body_name}}' for examples of how to word your request.", :public_body_name=>h(@info_request.public_body.name)) % [public_body_url(@info_request.public_body)] %> + <% else %> + <%= _('Browse <a href="%s">other requests</a> for examples of how to word your request.') % [request_list_url] %> + <% end %> + </div> + </p> + + <div id="request_header_text"> + <% if @info_request.public_body.has_notes? %> + <h3><%= _('Special note for this authority!') %></h3> + <p><%= @info_request.public_body.notes_as_html %></p> + <% end %> -<div id="request_header"> - <p> - <label class="form_label" for="info_request_public_body_id"><%= _('To:') %></label> - <span id="to_public_body"><%=h(@info_request.public_body.name)%></span> - <div class="form_item_note"> - <% if @info_request.public_body.info_requests.size > 0 %> - <%= _("Browse <a href='%s'>other requests</a> to '{{public_body_name}}' for examples of how to word your request.", :public_body_name=>h(@info_request.public_body.name)) % [public_body_url(@info_request.public_body)] %> - <% else %> - <%= _('Browse <a href="%s">other requests</a> for examples of how to word your request.') % [request_list_url] %> + <% if @info_request.public_body.eir_only? %> + <h3><%= _('Please ask for environmental information only') %></h3> + + <p><%= _('The Freedom of Information Act <strong>does not apply</strong> to') %> <%=h(@info_request.public_body.name)%>. + <%= _('However, you have the right to request environmental + information under a different law') %> (<a href="/help/requesting#eir">explanation</a>). + <%= _('This covers a very wide spectrum of information about the state of + the <strong>natural and built environment</strong>, such as:') %> + + <ul> + <li><%= _('Air, water, soil, land, flora and fauna (including how these effect + human beings)') %></li> + <li><%= _('Information on emissions and discharges (e.g. noise, energy, + radiation, waste materials)') %></li> + <li><%= _('Human health and safety') %></li> + <li><%= _('Cultural sites and built structures (as they may be affected by the + environmental factors listed above)') %></li> + <li><%= _('Plans and administrative measures that affect these matters') %></li> + </ul> + + <p><%= _('Please only request information that comes under those categories, <strong>do not waste your + time</strong> or the time of the public authority by requesting unrelated information.') %></p> <% end %> + </div> + + <p> + <label class="form_label" for="info_request_title"><%= _('Summary:') %></label> + <%= f.text_field :title, :size => 50, :id =>"typeahead_search" %> + </p> + <div class="form_item_note"> + (<%= _('a one line summary of the information you are requesting, + e.g.') %> + <% if @info_request.law_used == 'eir' %> + <%= _("'Pollution levels over time for the River Tyne'") %> + <% else %> + <%= _("'Crime statistics by ward level for Wales'") %> + <% end %> + ) + </div> + <div id="typeahead_response"> + </div> </div> - </p> - <p> - <label class="form_label" for="info_request_title"><%= _('Summary:') %></label> - <%= f.text_field :title, :size => 50, :id =>"typeahead_search" %> - </p> - <div class="form_item_note"> - (<%= _('a one line summary of the information you are requesting, - e.g.') %> - <% if @info_request.law_used == 'eir' %> - <%= _("'Pollution levels over time for the River Tyne'") %> - <% else %> - <%= _("'Crime statistics by ward level for Wales'") %> - <% end %> - ) - </div> - <div id="typeahead_response"> - </div> -</div> -<div id="request_advice"> - <ul> - <li><%= _('Write your request in <strong>simple, precise language</strong>.') %></li> - <li><%= _('Ask for <strong>specific</strong> documents or information, this site is not suitable for general enquiries.') %></li> - <li><%= _('Keep it <strong>focused</strong>, you\'ll be more likely to get what you want (<a href="%s">why?</a>).') % [help_requesting_path + '#focused'] %></li> - </ul> - - <% if @info_request.public_body.has_notes? %> - <h1><%= _('Special note for this authority!') %></h1> - <ul> - <li><p><%= @info_request.public_body.notes_as_html %></p></li> - </ul> - <% end %> - - <% if @info_request.public_body.eir_only? %> - <h1><%= _('Please ask for environmental information only') %></h1> - - <p><%= _('The Freedom of Information Act <strong>does not apply</strong> to') %> <%=h(@info_request.public_body.name)%>. - <%= _('However, you have the right to request environmental - information under a different law') %> (<a href="/help/requesting#eir">explanation</a>). - <%= _('This covers a very wide spectrum of information about the state of - the <strong>natural and built environment</strong>, such as:') %> - + <div id="request_advice"> <ul> - <li><%= _('Air, water, soil, land, flora and fauna (including how these effect - human beings)') %></li> - <li><%= _('Information on emissions and discharges (e.g. noise, energy, - radiation, waste materials)') %></li> - <li><%= _('Human health and safety') %></li> - <li><%= _('Cultural sites and built structures (as they may be affected by the - environmental factors listed above)') %></li> - <li><%= _('Plans and administrative measures that affect these matters') %></li> + <li><%= _('Write your request in <strong>simple, precise language</strong>.') %></li> + <li><%= _('Ask for <strong>specific</strong> documents or information, this site is not suitable for general enquiries.') %></li> + <li><%= _('Keep it <strong>focused</strong>, you\'ll be more likely to get what you want (<a href="%s">why?</a>).') % [help_requesting_path + '#focused'] %></li> </ul> + </div> - <p><%= _('Please only request information that comes under those categories, <strong>do not waste your - time</strong> or the time of the public authority by requesting unrelated information.') %></p> - <% end %> -</div> - - - <div id="request_form"> - <% fields_for :outgoing_message do |o| %> - <p> - <label class="form_label" for="outgoing_message_body"><%= _('Your request:') %></label> - <%= o.text_area :body, :rows => 20, :cols => 60 %> - </p> - <% end %> - + <div id="request_form"> + <% fields_for :outgoing_message do |o| %> + <p> + <label class="form_label" for="outgoing_message_body"><%= _('Your request:') %></label> + <%= o.text_area :body, :rows => 20, :cols => 60 %> + </p> + <% end %> + <% if !@user %> <p class="form_note"> <%= _('Everything that you enter on this page, including <strong>your name</strong>, @@ -120,18 +120,18 @@ this website forever (<a href="%s">why?</a>).') % [help_privacy_path+"#public_request"] %> </p> <% end %> - - <p class="form_note"> - <%= _('<strong> Can I request information about myself?</strong> - <a href="%s">No! (Click here for details)</a>') % [help_requesting_path+"#data_protection"] %> - </p> - - <div class="form_button"> - <%= f.hidden_field(:public_body_id, { :value => @info_request.public_body_id } ) %> - <%= hidden_field_tag(:submitted_new_request, 1 ) %> - <%= hidden_field_tag(:preview, 1 ) %> - <%= submit_tag _("Preview your public request") %> - </div> + + <p class="form_note"> + <%= _('<strong> Can I request information about myself?</strong> + <a href="%s">No! (Click here for details)</a>') % [help_requesting_path+"#data_protection"] %> + </p> + + <div class="form_button"> + <%= f.hidden_field(:public_body_id, { :value => @info_request.public_body_id } ) %> + <%= hidden_field_tag(:submitted_new_request, 1 ) %> + <%= hidden_field_tag(:preview, 1 ) %> + <%= submit_tag _("Preview your public request") %> + </div> <% if !@info_request.tag_string.empty? %> <p class="form_note"> @@ -142,8 +142,8 @@ <strong>Tags:</strong> <%=h @info_request.tag_string %> </p> <% end %> - - </div> + + </div> <% end %> diff --git a/public/asktheeu-theme b/public/asktheeu-theme new file mode 120000 index 000000000..108ef0abe --- /dev/null +++ b/public/asktheeu-theme @@ -0,0 +1 @@ +/Users/David/src/asktheeu/asktheeu/vendor/plugins/asktheeu-theme/public
\ No newline at end of file diff --git a/public/stylesheets/main.css b/public/stylesheets/main.css index cf72f4a61..0c669e8ef 100644 --- a/public/stylesheets/main.css +++ b/public/stylesheets/main.css @@ -949,6 +949,12 @@ a img.attachment_image { padding-bottom: 1em; } +#request_header_text +{ + font-size: 0.8em; + margin-left: 11em; +} + #request_search_ahead_results { font-size: 0.8em; |