diff options
Diffstat (limited to 'app/views/request')
-rw-r--r-- | app/views/request/_after_actions.html.erb | 2 | ||||
-rw-r--r-- | app/views/request/_followup.html.erb | 15 | ||||
-rw-r--r-- | app/views/request/_hidden_correspondence.html.erb | 12 | ||||
-rw-r--r-- | app/views/request/_sidebar.html.erb | 16 | ||||
-rw-r--r-- | app/views/request/followup_bad.html.erb | 12 | ||||
-rw-r--r-- | app/views/request/hidden.html.erb | 6 | ||||
-rw-r--r-- | app/views/request/new.html.erb | 11 | ||||
-rw-r--r-- | app/views/request/new_please_describe.html.erb | 2 | ||||
-rw-r--r-- | app/views/request/preview.html.erb | 10 | ||||
-rw-r--r-- | app/views/request/select_authority.html.erb | 16 | ||||
-rw-r--r-- | app/views/request/show.html.erb | 8 | ||||
-rw-r--r-- | app/views/request/show_response.html.erb | 4 | ||||
-rw-r--r-- | app/views/request/upload_response.html.erb | 4 |
13 files changed, 61 insertions, 57 deletions
diff --git a/app/views/request/_after_actions.html.erb b/app/views/request/_after_actions.html.erb index d3ddb981b..b54a8f5fb 100644 --- a/app/views/request/_after_actions.html.erb +++ b/app/views/request/_after_actions.html.erb @@ -7,7 +7,7 @@ <ul> <% if @info_request.comments_allowed? %> <li> - <%= raw(_('<a href="%s">Add an annotation</a> (to help the requester or others)') % [new_comment_path(:url_title => @info_request.url_title)]) %> + <%= raw(_('<a href="{{url}}">Add an annotation</a> (to help the requester or others)', :url => new_comment_url(:url_title => @info_request.url_title).html_safe)) %> </li> <% end %> <% if @old_unclassified %> diff --git a/app/views/request/_followup.html.erb b/app/views/request/_followup.html.erb index 6d2282613..bb099ff15 100644 --- a/app/views/request/_followup.html.erb +++ b/app/views/request/_followup.html.erb @@ -49,9 +49,9 @@ <% else %> <% if @internal_review %> <p> - <%= raw(_('If you are dissatisfied by the response you got from + <%= _('If you are dissatisfied by the response you got from the public authority, you have the right to - complain (<a href="%s">details</a>).') % "http://foiwiki.com/foiwiki/index.php/Internal_reviews") %> + complain (<a href="{{url}}">details</a>).', :url => "http://foiwiki.com/foiwiki/index.php/Internal_reviews".html_safe) %> </p> <% end %> @@ -61,21 +61,20 @@ <% status = @info_request.calculate_status %> <% if status == 'waiting_response_overdue' %> - <p><%= _('The response to your request has been <strong>delayed</strong>. You can say that, + <p><%= _('The response to your request has been <strong>delayed</strong>. You can say that, by law, the authority should normally have responded <strong>promptly</strong> and') %> <% if @info_request.public_body.is_school? %> <%= _('in term time') %> <% end %> <%= _('by <strong>{{date}}</strong>',:date=>simple_date(@info_request.date_response_required_by)) %> - (<%= raw(_('<a href="%s">details</a>') % ["#{help_requesting_path}#quickly_response"]) %>). - + (<%= link_to _('details'), "#{help_requesting_path}#quickly_response" %>). </p> <% elsif status == 'waiting_response_very_overdue' %> <p> - <%= _('The response to your request is <strong>long overdue</strong>. You can say that, by + <%= _('The response to your request is <strong>long overdue</strong>. You can say that, by law, under all circumstances, the authority should have responded - by now') %> (<%= raw(_('<a href="%s">details</a>') % ["#{help_requesting_path}#quickly_response"]) %>). + by now') %> (<%= link_to _('details'), "#{help_requesting_path}#quickly_response" %>). </p> <% end %> @@ -103,7 +102,7 @@ <div> <%= radio_button "outgoing_message", "what_doing", "internal_review", :id => "internal_review" %> <label for="internal_review"><%= _('I am requesting an <strong>internal review</strong>') %> - <%= raw(_('<a href="%s">what\'s that?</a>') % ["/help/unhappy"]) %> + <%= link_to _("what's that?"), "/help/unhappy" %> </label> </div> <div> diff --git a/app/views/request/_hidden_correspondence.html.erb b/app/views/request/_hidden_correspondence.html.erb index a5e680385..5ee9a4724 100644 --- a/app/views/request/_hidden_correspondence.html.erb +++ b/app/views/request/_hidden_correspondence.html.erb @@ -7,21 +7,21 @@ %> <div class="correspondence" id="incoming-<%=incoming_message.id.to_s%>"> <p> - <%= raw(_('This response has been hidden. See annotations to find out why. - If you are the requester, then you may <a href="%s">sign in</a> to view the response.') % [signin_url(:r => request.fullpath)]) %> + <%= _('This response has been hidden. See annotations to find out why. + If you are the requester, then you may <a href="{{url}}">sign in</a> to view the response.', :url => signin_url(:r => request.fullpath).html_safe) %> </p> </div> <% elsif [ 'sent', 'followup_sent', 'resent', 'followup_resent' ].include?(info_request_event.event_type) %> <div class="correspondence" id="outgoing-<%=outgoing_message.id.to_s%>"> <p> - <%= raw(_('This outgoing message has been hidden. See annotations to - find out why. If you are the requester, then you may <a href="%s">sign in</a> to view the response.') % [signin_url(:r => request.fullpath)]) %> + <%= _('This outgoing message has been hidden. See annotations to + find out why. If you are the requester, then you may <a href="{{url}}">sign in</a> to view the response.', :url => signin_url(:r => request.fullpath).html_safe) %> </p> </div> <% elsif info_request_event.event_type == 'comment' %> <div class="comment_in_request" id="comment-<%=comment.id.to_s%>"> - <p><%= raw(_('This comment has been hidden. See annotations to - find out why. If you are the requester, then you may <a href="%s">sign in</a> to view the response.') % [signin_url(:r => request.fullpath)]) %> + <p><%= _('This comment has been hidden. See annotations to + find out why. If you are the requester, then you may <a href="{{url}}">sign in</a> to view the response.', :url => signin_url(:r => request.fullpath).html_safe) %> </p> </div> <% end %> diff --git a/app/views/request/_sidebar.html.erb b/app/views/request/_sidebar.html.erb index 80536da3e..e0b01924d 100644 --- a/app/views/request/_sidebar.html.erb +++ b/app/views/request/_sidebar.html.erb @@ -3,7 +3,12 @@ <h2><%= _('Follow this request') %></h2> <% follower_count = TrackThing.count(:all, :conditions => ["info_request_id = ?", @info_request.id]) + 1 %> - <p><%= n_("There is %d person following this request", "There are %d people following this request", follower_count) % follower_count %></p> + <p> + <%= n_("There is {{count}} person following this request", + "There are {{count}} people following this request", + follower_count, + :count => follower_count) %> + </p> <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => @info_request.user && @info_request.user == @user, :location => 'sidebar' } %> </div> <% if @info_request.described_state != "attention_requested" %> @@ -17,10 +22,10 @@ <% elsif @info_request.prominence == 'requester_only' %> <%# The eccentric formatting of the following string is in order that it be identical to the corresponding string in request/show.html.erb %> - <p><%= raw(_('This request is hidden, so that only you the requester can see it. Please - <a href="%s">contact us</a> if you are not sure why.') % [help_requesting_path]) %></p> + <p><%= _('This request is hidden, so that only you the requester can see it. Please + <a href="{{url}}">contact us</a> if you are not sure why.', :url => help_requesting_path.html_safe) %></p> <% else %> - <p><%= raw(_('This request has been marked for review by the site administrators, who have not hidden it at this time. If you believe it should be hidden, please <a href="%s">contact us</a>.') % [help_requesting_path]) %></p> + <p><%= _('This request has been marked for review by the site administrators, who have not hidden it at this time. If you believe it should be hidden, please <a href="{{url}}">contact us</a>.', :url => help_requesting_path.html_safe) %></p> <% end %> <% else %> <p><%= _('Requests for personal information and vexatious requests are not considered valid for FOI purposes (<a href="/help/about">read more</a>).') %></p> @@ -62,7 +67,6 @@ <!-- this link with this wording is here for legal reasons, discuss with board and our lawyer before changing or removing it --> - <p><small><%= raw(_('<a href="%s">Are you the owner of - any commercial copyright on this page?</a>') % [help_officers_path+"#copyright"]) %></small></p> + <p><small><%= link_to _('Are you the owner of any commercial copyright on this page?'), help_officers_path+"#copyright" %></small></p> </div> diff --git a/app/views/request/followup_bad.html.erb b/app/views/request/followup_bad.html.erb index c892263e6..ea2400c5d 100644 --- a/app/views/request/followup_bad.html.erb +++ b/app/views/request/followup_bad.html.erb @@ -9,21 +9,21 @@ <% if @reason == 'not_apply' %> <!-- we should never get here, but just in case give a sensible message --> <p><%= _('Freedom of Information law no longer applies to') %> <%=h @info_request.public_body.name %>. - <%= raw(_('From the request page, try replying to a particular message, rather than sending + <%= _('From the request page, try replying to a particular message, rather than sending a general followup. If you need to make a general followup, and know - an email which will go to the right place, please <a href="%s">send it to us</a>.') % [help_contact_path]) %> + an email which will go to the right place, please <a href="{{url}}">send it to us</a>.', :url => help_contact_path.html_safe) %> </p> <% elsif @reason == 'defunct' %> <!-- we should never get here, but just in case give a sensible message --> - <p><%=h @info_request.public_body.name %> <%= raw(_('no longer exists. If you are trying to make + <p><%=h @info_request.public_body.name %> <%= _('no longer exists. If you are trying to make From the request page, try replying to a particular message, rather than sending a general followup. If you need to make a general followup, and know - an email which will go to the right place, please <a href="%s">send it to us</a>.') % [help_contact_path]) %> + an email which will go to the right place, please <a href="{{url}}">send it to us</a>.', :url => help_contact_path.html_safe) %> </p> <% elsif @reason == 'bad_contact' %> - <p><%= _('We do not have a working {{law_used_full}} address for {{public_body_name}}.',:law_used_full=>h(@info_request.law_used_full),:public_body_name=>h(@info_request.public_body.name)) %> <%= raw(_('You may be able to find + <p><%= _('We do not have a working {{law_used_full}} address for {{public_body_name}}.',:law_used_full=>h(@info_request.law_used_full),:public_body_name=>h(@info_request.public_body.name)) %> <%= _('You may be able to find one on their website, or by phoning them up and asking. If you manage - to find one, then please <a href="%s">send it to us</a>.') % [help_contact_path]) %> + to find one, then please <a href="{{url}}">send it to us</a>.', :url => help_contact_path.html_safe) %> </p> <% elsif @reason == 'external' %> <p><%= _("Followups cannot be sent for this request, as it was made externally, and published here by {{public_body_name}} on the requester's behalf.", :public_body_name => h(@info_request.public_body.name)) %> diff --git a/app/views/request/hidden.html.erb b/app/views/request/hidden.html.erb index 41b2ff7e4..f2f76a817 100644 --- a/app/views/request/hidden.html.erb +++ b/app/views/request/hidden.html.erb @@ -6,13 +6,13 @@ <%=@details%> </p> -<p><%= raw(_('The request you have tried to view has been removed. There are +<p><%= _('The request you have tried to view has been removed. There are various reasons why we might have done this, sorry we can\'t be more specific here. Please <a - href="%s">contact us</a> if you have any questions.') % [help_contact_path]) %> + href="{{url}}">contact us</a> if you have any questions.', :url => help_contact_path.html_safe) %> </p> <% if @info_request.prominence == 'requester_only' %> <p> - <%= raw(_('If you are the requester, then you may <a href="%s">sign in</a> to view the request.') % [signin_url(:r => request.fullpath)]) %> + <%= _('If you are the requester, then you may <a href="{{url}}">sign in</a> to view the request.', :url => signin_url(:r => request.fullpath).html_safe) %> </p> <% end %> diff --git a/app/views/request/new.html.erb b/app/views/request/new.html.erb index 398147041..8b7d38ac0 100644 --- a/app/views/request/new.html.erb +++ b/app/views/request/new.html.erb @@ -98,7 +98,7 @@ <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><%= raw(_('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> + <li><%= _('Keep it <strong>focused</strong>, you\'ll be more likely to get what you want (<a href="{{url}}">why?</a>).', :url => (help_requesting_path + '#focused').html_safe) %></li> </ul> </div> @@ -112,23 +112,24 @@ <% if !@user %> <p class="form_note"> + <%= raw(_('Everything that you enter on this page, including <strong>your name</strong>, will be <strong>displayed publicly</strong> on - this website forever (<a href="%s">why?</a>).') % [help_privacy_path+"#public_request"]) %> + this website forever (<a href="{{url}}">why?</a>).', :url => (help_privacy_path+"#public_request").html_safe)) %> <%= raw(_('If you are thinking of using a pseudonym, - please <a href="%s">read this first</a>.') % [help_privacy_path+"#real_name"]) %> + please <a href="{{url}}">read this first</a>.', :url => (help_privacy_path+"#real_name").html_safe)) %> </p> <% else %> <p class="form_note"> <%= raw(_('Everything that you enter on this page will be <strong>displayed publicly</strong> on - this website forever (<a href="%s">why?</a>).') % [help_privacy_path+"#public_request"]) %> + this website forever (<a href="{{url}}">why?</a>).', :url => (help_privacy_path+"#public_request").html_safe)) %> </p> <% end %> <p class="form_note"> <%= raw(_("<strong> Can I request information about myself?</strong>\n" + - "\t\t\t<a href=\"%s\">No! (Click here for details)</a>") % [help_requesting_path+"#data_protection"]) %> + "\t\t\t<a href=\"{{url}}\">No! (Click here for details)</a>", :url => (help_requesting_path+"#data_protection").html_safe)) %> </p> <div class="form_button"> diff --git a/app/views/request/new_please_describe.html.erb b/app/views/request/new_please_describe.html.erb index 6a193e70d..5a67d01f9 100644 --- a/app/views/request/new_please_describe.html.erb +++ b/app/views/request/new_please_describe.html.erb @@ -13,7 +13,7 @@ if they are successful yet or not.') %> </ul> <p> - <%= raw(_('When you\'re done, <strong>come back here</strong>, <a href="%s">reload this page</a> and file your new request.') % [request.fullpath]) %> + <%= _('When you\'re done, <strong>come back here</strong>, <a href="{{url}}">reload this page</a> and file your new request.', :url => request.fullpath.html_safe) %> </p> <p> diff --git a/app/views/request/preview.html.erb b/app/views/request/preview.html.erb index 84be15ed2..243dc90a9 100644 --- a/app/views/request/preview.html.erb +++ b/app/views/request/preview.html.erb @@ -6,7 +6,7 @@ <ul> <li><%= _('Check you haven\'t included any <strong>personal information</strong>.') %></li> <li><%= raw(_('Your name, request and any responses will appear in <strong>search engines</strong> - (<a href="%s">details</a>).') % [help_privacy_path+"#public_request"]) %> + (<a href="{{url}}">details</a>).', :url => (help_privacy_path+"#public_request").html_safe)) %> </li> </ul> @@ -23,13 +23,13 @@ <%= o.hidden_field(:body) %> </div> - <p class="event_actions"> + <p class="event_actions"> </p> </div> <% end %> - <p><%= raw(_('<strong>Privacy note:</strong> If you want to request private information about - yourself then <a href="%s">click here</a>.') % [help_requesting_path+"#data_protection"]) %> + <p><%= _('<strong>Privacy note:</strong> If you want to request private information about + yourself then <a href="{{url}}">click here</a>.', :url => (help_requesting_path+"#data_protection").html_safe) %> <p> <%= f.hidden_field(:title) %> @@ -38,7 +38,7 @@ <%= hidden_field_tag(:submitted_new_request, 1) %> <%= hidden_field_tag(:preview, 0 ) %> <%= submit_tag _("Edit this request"), :name => 'reedit', :id => 'reedit_button' %> - <%= submit_tag _("Send request"), :name => 'submit', :id => 'submit_button' %> + <%= submit_tag _("Send request"), :name => 'submit', :id => 'submit_button' %> </p> <% if !@info_request.tag_string.empty? %> diff --git a/app/views/request/select_authority.html.erb b/app/views/request/select_authority.html.erb index 43a91beff..c01e2776f 100644 --- a/app/views/request/select_authority.html.erb +++ b/app/views/request/select_authority.html.erb @@ -2,22 +2,22 @@ <script type="text/javascript"> $(document).ready(function(){ $("#authority_preview").hide(); - + // Avoid triggering too often (on each keystroke) by using the debounce jQuery plugin: // http://benalman.com/projects/jquery-throttle-debounce-plugin/ - $("#query").keypress($.debounce( 300, function() { + $("#query").keypress($.debounce( 300, function() { // Do a type ahead search and display results $("#typeahead_response").load("<%=search_ahead_bodies_url%>?query="+encodeURI(this.value), function() { $("#authority_preview").hide(); // Hide the preview, since results have changed }); })); - // We're using the existing body list: we intercept the clicks on the titles to + // We're using the existing body list: we intercept the clicks on the titles to // display a preview on the right hand side of the screen $("#typeahead_response .head a").live('click', function() { $("#authority_preview").load(this.href+" #public_body_show", function() { $("#authority_preview").show(); - $(window).scrollTop($("#banner").height()); + $(window).scrollTop($("#banner").height()); $("#authority_preview #header_right").hide(); }); return false; @@ -33,9 +33,9 @@ <%= form_tag({:controller => "request", :action => "select_authority"}, {:id => "search_form", :method => "get"}) do %> <div> <p> - <%= raw(_('First, type in the <strong>name of the UK public authority</strong> you\'d + <%= _('First, type in the <strong>name of the UK public authority</strong> you\'d like information from. <strong>By law, they have to respond</strong> - (<a href="%s#%s">why?</a>).') % [help_about_path, "whybother_them"]) %> + (<a href="{{url}}">why?</a>).', :url => (help_about_path + "#whybother_them").html_safe) %> </p> <%= text_field_tag 'query', params[:query], { :size => 30, :title => "type your search term here" } %> <%= hidden_field_tag 'bodies', 1 %> @@ -64,7 +64,7 @@ </div> </div> - + <div id="authority_preview"> </div> - + diff --git a/app/views/request/show.html.erb b/app/views/request/show.html.erb index 54006b291..4b0663f76 100644 --- a/app/views/request/show.html.erb +++ b/app/views/request/show.html.erb @@ -10,8 +10,8 @@ <% end %> <% if @info_request.prominence == 'requester_only' %> <p id="hidden_request"> - <%= raw(_('This request is hidden, so that only you the requester can see it. Please - <a href="%s">contact us</a> if you are not sure why.') % [help_requesting_path]) %> + <%= _('This request is hidden, so that only you the requester can see it. Please + <a href="{{url}}">contact us</a> if you are not sure why.', :url => help_requesting_path.html_safe) %> </p> <% end %> @@ -80,11 +80,11 @@ <%= _('in term time') %> <% end %> <%= _('by') %> <strong><%= simple_date(@info_request.date_response_required_by) %></strong> - (<%= raw(_('<a href="%s">details</a>') % [help_requesting_path + '#quickly_response']) %>) + (<%= link_to _('details'), help_requesting_path + '#quickly_response' %>) <% elsif @status == 'waiting_response_very_overdue' %> <%= _('Response to this request is <strong>long overdue</strong>.') %> <%= _('By law, under all circumstances, {{public_body_link}} should have responded by now',:public_body_link => public_body_link(@info_request.public_body)) %> - (<%= raw(_('<a href="%s">details</a>') % [help_requesting_path + '#quickly_response']) %>). + (<%= link_to _('details'), help_requesting_path + '#quickly_response' %>). <% if !@info_request.is_external? %> <%= _('You can <strong>complain</strong> by') %> <%= link_to _("requesting an internal review"), show_response_no_followup_path(:id => @info_request.id, :incoming_message_id => nil) + "?internal_review=1#followup" %>. diff --git a/app/views/request/show_response.html.erb b/app/views/request/show_response.html.erb index ac1f04227..a61359679 100644 --- a/app/views/request/show_response.html.erb +++ b/app/views/request/show_response.html.erb @@ -26,8 +26,8 @@ <%= _('The authority only has a <strong>paper copy</strong> of the information.') %> </dt> <dd> - <%= raw(_('At the bottom of this page, write a reply to them trying to persuade them to scan it in - (<a href="%s">more details</a>).') % [help_privacy_path + '#postal_answer']) %> + <%= _('At the bottom of this page, write a reply to them trying to persuade them to scan it in + (<a href="{{url}}">more details</a>).', :url => (help_privacy_path + '#postal_answer').html_safe) %> </dd> <dt> diff --git a/app/views/request/upload_response.html.erb b/app/views/request/upload_response.html.erb index 158d5d3c4..f5fd6f000 100644 --- a/app/views/request/upload_response.html.erb +++ b/app/views/request/upload_response.html.erb @@ -12,7 +12,7 @@ <h1><%= _('Respond to the FOI request')%> '<%=request_link(@info_request)%>'<% _(' made by ')%><%=user_link(@info_request.user) %></h1> <p> - <%= raw(_('Your response will <strong>appear on the Internet</strong>, <a href="%s">read why</a> and answers to other questions.') % [help_officers_path]) %> + <%= raw(_('Your response will <strong>appear on the Internet</strong>, <a href="{{url}}">read why</a> and answers to other questions.', :url => help_officers_path.html_safe)) %> </p> <h2><%= _('Respond by email')%></h2> @@ -28,7 +28,7 @@ <h2><%= _('Respond using the web')%></h2> <p><%= raw(_('Enter your response below. You may attach one file (use email, or - <a href="%s">contact us</a> if you need more).')% [help_contact_path]) %></p> + <a href="{{url}}">contact us</a> if you need more).', :url => help_contact_path.html_safe)) %></p> <%= form_tag '', :id => 'upload_response_form', :multipart => true do %> <p> |