diff options
Diffstat (limited to 'app/views')
23 files changed, 70 insertions, 64 deletions
diff --git a/app/views/contact_mailer/user_message.rhtml b/app/views/contact_mailer/user_message.rhtml index fe1f47518..b1d6e81ae 100644 --- a/app/views/contact_mailer/user_message.rhtml +++ b/app/views/contact_mailer/user_message.rhtml @@ -1,7 +1,8 @@ --------------------------------------------------------------------- <%= _('{{user_name}} has used {{site_name}} to send you the message below.', :user_name=>@from_user.name, :site_name=>site_name) %> -<%= _('Your details have not been given to anyone, unless you choose to reply to this -message, which will then go directly to the person who wrote the message.')%> +<%= _('Your details, including your email address, have not been given to anyone.') %> +<%= _('If you reply to this message it will go directly to {{user_name}}, who will +learn your email address. Only reply if that is okay.', :user_name => @from_user.name) %> --------------------------------------------------------------------- <%= @message.strip %> diff --git a/app/views/general/_advanced_search_tips.rhtml b/app/views/general/_advanced_search_tips.rhtml index 520cce89b..914abc1af 100644 --- a/app/views/general/_advanced_search_tips.rhtml +++ b/app/views/general/_advanced_search_tips.rhtml @@ -13,7 +13,7 @@ <li><%= _('<strong><code>request:</code></strong> to restrict to a specific request, typing the title as in the URL.')%> <li><%= _('<strong><code>filetype:pdf</code></strong> to find all responses with PDF attachments. Or try these: <code>{{list_of_file_extensions}}</code>', :list_of_file_extensions => IncomingMessage.get_all_file_extensions)%></li> <li><%= _('Type <strong><code>01/01/2008..14/01/2008</code></strong> to only show things that happened in the first two weeks of January.')%></li> - <li><%= _('<strong><code>tag:charity</code></strong> to find all public bodies or requests with a given tag. You can include multiple tags, + <li><%= _('<strong><code>tag:charity</code></strong> to find all public authorities or requests with a given tag. You can include multiple tags, and tag values, e.g. <code>tag:openlylocal AND tag:financial_transaction:335633</code>. Note that by default any of the tags can be present, you have to put <code>AND</code> explicitly if you only want results them all present.')%></li> <li><%= _('Read about <a href="{{advanced_search_url}}">advanced search operators</a>, such as proximity and wildcards.', :advanced_search_url => "http://www.xapian.org/docs/queryparser.html") %></li> diff --git a/app/views/general/_footer.rhtml b/app/views/general/_footer.rhtml index efcd8f96b..ab5ab2c47 100644 --- a/app/views/general/_footer.rhtml +++ b/app/views/general/_footer.rhtml @@ -1,6 +1,6 @@ <div id="footer"> <%= link_to _("Contact {{site_name}}", :site_name => site_name), help_contact_url %> -| <img src="/images/twitter-16.png" alt="twitter icon" class="twitter-icon"> <a href="https://twitter.com/<%= MySociety::Config.get('TWITTER_USERNAME') %>"><%= _("Follow us on twitter") %></a> +| <img src="/images/twitter-16.png" alt="twitter icon" class="twitter-icon"> <a href="https://twitter.com/<%= Configuration::twitter_username %>"><%= _("Follow us on twitter") %></a> <%= render :partial => 'general/credits' %> </div> <div class="after-footer"> </div> diff --git a/app/views/general/_frontpage_search_examples.es.rhtml b/app/views/general/_frontpage_search_examples.es.rhtml deleted file mode 100644 index 63c7c3c1e..000000000 --- a/app/views/general/_frontpage_search_examples.es.rhtml +++ /dev/null @@ -1 +0,0 @@ -por ejemplo <a href="/es/search/El%20Geraldine%20Quango">El Geraldine Quango</a>, <a href="/search/fancy%20dog">Fancy Dog</a>. diff --git a/app/views/general/_frontpage_search_examples.rhtml b/app/views/general/_frontpage_search_examples.rhtml deleted file mode 100644 index 359a132e2..000000000 --- a/app/views/general/_frontpage_search_examples.rhtml +++ /dev/null @@ -1 +0,0 @@ -for example <a href="/search/Geraldine%20Quango">Geraldine Quango</a> or <a href="/search/fancy%20dog">Fancy Dog</a>. diff --git a/app/views/general/_stylesheet_includes.rhtml b/app/views/general/_stylesheet_includes.rhtml index 2ffa5dadf..7a03680f8 100644 --- a/app/views/general/_stylesheet_includes.rhtml +++ b/app/views/general/_stylesheet_includes.rhtml @@ -16,6 +16,6 @@ <![endif]--> <!-- the following method for customising CSS is deprecated; see `doc/THEMES.md` for detail --> <%= stylesheet_link_tag 'custom', :title => "Main", :rel => "stylesheet" %> - <% if force_registration_on_new_request %> + <% if Configuration::force_registration_on_new_request %> <%= stylesheet_link_tag 'jquery.fancybox-1.3.4', :rel => "stylesheet" %> <% end %> diff --git a/app/views/general/advanced_search.rhtml b/app/views/general/advanced_search.rhtml deleted file mode 100644 index e69de29bb..000000000 --- a/app/views/general/advanced_search.rhtml +++ /dev/null diff --git a/app/views/general/frontpage.rhtml b/app/views/general/frontpage.rhtml index 38133e7ab..e2d74a5e2 100644 --- a/app/views/general/frontpage.rhtml +++ b/app/views/general/frontpage.rhtml @@ -40,7 +40,7 @@ <ul> <% for popular_body in @popular_bodies %> <li><%=public_body_link(popular_body)%> - <%= n_('%d request', '%d requests', popular_body.info_requests.count) % popular_body.info_requests.count %> + <%= n_('%d request', '%d requests', popular_body.info_requests_count) % popular_body.info_requests_count %> </li> <% end%> </ul> @@ -51,20 +51,32 @@ <% end %> <div id="examples_1"> - <h3><%= _("What information has been released?") %></h3> - <%= _("{{site_name}} users have made {{number_of_requests}} requests, including:", + <h3> + <% if @request_events_all_successful %> + <%= _("What information has been released?") %> + <% else %> + <%= _("What information has been requested?") %> + <% end %> + </h3> + <%= _("{{site_name}} users have made {{number_of_requests}} requests, including:", :site_name => site_name, :number_of_requests => InfoRequest.count) %> <ul> <% for event in @request_events %> <li> <%= public_body_link(event.info_request.public_body) %> <%= _('answered a request about') %> - <%=link_to h(event.info_request.title), request_url(event.info_request)%> - <%= _('{{length_of_time}} ago', :length_of_time => time_ago_in_words(event.described_at)) %> + <%=link_to h(event.info_request.title), request_url(event.info_request)%> + <%= _('{{length_of_time}} ago', :length_of_time => time_ago_in_words(event.described_at)) %> <p class="excerpt" onclick="document.location.href='<%=request_url(event.info_request)%>'"><%= excerpt(event.search_text_main(true), "", 200) %></p> </li> <% end %> </ul> - <p><strong><%=link_to _('More successful requests...'), request_list_successful_url %></strong></p> + <p><strong> + <% if @request_events_all_successful %> + <%=link_to _('More successful requests...'), request_list_successful_url %> + <% else %> + <%=link_to _('More requests...'), request_list_all_url %> + <% end %> + </strong></p> </div> </div> diff --git a/app/views/help/_sidebar.rhtml b/app/views/help/_sidebar.rhtml index 21038e8df..783d35983 100644 --- a/app/views/help/_sidebar.rhtml +++ b/app/views/help/_sidebar.rhtml @@ -8,7 +8,7 @@ <li><%= link_to_unless_current "About the software", "/help/alaveteli" %></li> <li><%= link_to_unless_current "Credits", "/help/credits" %></li> <li><%= link_to_unless_current "Programmers API", "/help/api" %></li> - <li><%= link_to_unless_current "Advanced search", "/search" %></li> + <li><%= link_to_unless_current "Advanced search", "/advancedsearch" %></li> </ul> <h2 id="contact">Contact us</h2> diff --git a/app/views/help/contact.rhtml b/app/views/help/contact.rhtml index dd49f7951..37df68f49 100644 --- a/app/views/help/contact.rhtml +++ b/app/views/help/contact.rhtml @@ -10,27 +10,18 @@ <h2>Contact an authority to get official information</h2> <ul> <li><a href="/new">Go here</a> to make a request, in public, for information - from UK public authorities.</li> + from public authorities.</li> <li> Asking for private information about yourself? - Please read our help page about - <a href="/help/requesting#data_protection">data protection</a>. + Please read our + <a href="/help/requesting#data_protection">help page</a>. </li> </ul> - <h2>Take up an issue with Government</h2> - - <ul> - <li><a href="http://www.writetothem.com">Write to your MP, - local councillor or other representative</a>. - <li><a href="http://www.number10.gov.uk/">Number 10</a> is a good place to start if you would like to take an issue up with central government. </li> - </ul> - - <% end %> - <h2>Contact the WhatDoTheyKnow team</h2> + <h2>Contact the <%= site_name %> team</h2> <% if !flash[:notice] %> <ul> <li> @@ -91,8 +82,7 @@ <p class="form_note"> We can only help you with <strong>technical problems</strong>, or questions - about Freedom of Information. See the top of this page if you would like to - contact the Government. + about Freedom of Information. </P> diff --git a/app/views/layouts/default.rhtml b/app/views/layouts/default.rhtml index e4022661f..0dd493fd0 100644 --- a/app/views/layouts/default.rhtml +++ b/app/views/layouts/default.rhtml @@ -42,7 +42,7 @@ <%= render :partial => 'general/before_head_end' %> </head> <body class="<%= 'admin' if is_admin? %> <%= 'front' if params[:action] == 'frontpage' %>"> - <% if force_registration_on_new_request && !@user %> + <% if Configuration::force_registration_on_new_request && !@user %> <%= javascript_include_tag 'jquery.fancybox-1.3.4.pack' %> <script type="text/javascript"> $(document).ready(function() { @@ -139,15 +139,13 @@ <input type="text"> </div> <% - ga_code = MySociety::Config.get('GA_CODE', '') - - unless ga_code.empty? %> + unless Configuration::ga_code.empty? %> <script> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script> - var pageTracker = _gat._getTracker("<%=ga_code%>"); + var pageTracker = _gat._getTracker("<%= Configuration::ga_code %>"); pageTracker._trackPageview(); </script> diff --git a/app/views/public_body/_list_sidebar_extra.rhtml b/app/views/public_body/_list_sidebar_extra.rhtml new file mode 100644 index 000000000..6857a7eb5 --- /dev/null +++ b/app/views/public_body/_list_sidebar_extra.rhtml @@ -0,0 +1,6 @@ +<p> + <%= _('<a href="%s">Are we missing a public authority?</a>') % [help_requesting_path + '#missing_body'] %> +</p> +<p> + <%= link_to _('List of all authorities (CSV)'), all_public_bodies_csv_url() %> +</p> diff --git a/app/views/public_body/list.rhtml b/app/views/public_body/list.rhtml index 8cb207bd4..3a64de1f7 100644 --- a/app/views/public_body/list.rhtml +++ b/app/views/public_body/list.rhtml @@ -25,15 +25,10 @@ <% if not first_row %> </ul> <% end %> - <p> - <%= _('<a href="%s">Are we missing a public authority?</a>.') % [help_requesting_path + '#missing_body'] %> - </p> - <p> - <%= link_to _('List of all authorities (CSV)'), all_public_bodies_csv_url() %> - </p> + <%= render :partial => "list_sidebar_extra" %> </div> -<% @title = _("Public authorities - {{description}}", :description => @description) %> +<% @title = @description.empty? ? _("Public authorities") : _("Public authorities - {{description}}", :description => @description) %> <div id="left_column_flip"> <h1><%= _('Public authorities') %></h1> @@ -44,7 +39,7 @@ </div> <% end %> -<h2 class="publicbody_results"><%= _('Found {{count}} public bodies {{description}}', :count=>@public_bodies.total_entries, :description=>@description) %></h2> +<h2 class="publicbody_results"><%= n_('Found %d public authority %s', 'Found %d public authorities %s', @public_bodies.total_entries) % [@public_bodies.total_entries, @description] %></h2> <%= render :partial => 'body_listing', :locals => { :public_bodies => @public_bodies } %> <%= will_paginate(@public_bodies) %><br/> diff --git a/app/views/public_body/show.rhtml b/app/views/public_body/show.rhtml index 63bd5f7fc..b56556d5d 100644 --- a/app/views/public_body/show.rhtml +++ b/app/views/public_body/show.rhtml @@ -64,6 +64,12 @@ <% else %> <%= _('For an unknown reason, it is not possible to make a request to this authority.')%> <% end %> + + <% if @public_body.override_request_email %> + <p> + <%= _("<strong>Note:</strong> Because we're testing, requests are being sent to {{email}} rather than to the actual authority.", :email => @public_body.override_request_email) %> + </p> + <% end %> </div> </div> diff --git a/app/views/request/_sidebar.rhtml b/app/views/request/_sidebar.rhtml index dc0d2eb31..18684943a 100644 --- a/app/views/request/_sidebar.rhtml +++ b/app/views/request/_sidebar.rhtml @@ -31,7 +31,7 @@ <h2><%= _("Act on what you've learnt") %></h2> <div class="act_link"> - <% tweet_link = "https://twitter.com/share?url=#{h(request.url)}&via=#{h(MySociety::Config.get('TWITTER_USERNAME', ''))}&text='#{h(@info_request.title)}'&related=#{_('alaveteli_foi:The software that runs {{site_name}}', :site_name => h(site_name))}" %> + <% tweet_link = "https://twitter.com/share?url=#{h(request.url)}&via=#{h(Configuration::twitter_username)}&text='#{h(@info_request.title)}'&related=#{_('alaveteli_foi:The software that runs {{site_name}}', :site_name => h(site_name))}" %> <%= link_to '<img src="/images/twitter-16.png" alt="twitter icon">', tweet_link %> <%= link_to _("Tweet this request"), tweet_link %> </div> diff --git a/app/views/request/_summary_suggestion.rhtml b/app/views/request/_summary_suggestion.rhtml new file mode 100644 index 000000000..a5da09cda --- /dev/null +++ b/app/views/request/_summary_suggestion.rhtml @@ -0,0 +1,5 @@ +<% if @info_request.law_used == 'eir' %> + <%= _("'Pollution levels over time for the River Tyne'") %> +<% else %> + <%= _("'Crime statistics by ward level for Wales'") %> +<% end %> diff --git a/app/views/request/new.rhtml b/app/views/request/new.rhtml index 23212fc0b..fe4c2067d 100644 --- a/app/views/request/new.rhtml +++ b/app/views/request/new.rhtml @@ -86,12 +86,7 @@ </p> <div class="form_item_note"> (<%= _("a one line summary of the information you are requesting, \n\t\t\te.g.") %> - <% if @info_request.law_used == 'eir' %> - <%= _("'Pollution levels over time for the River Tyne'") %> - <% else %> - <%= _("'Crime statistics by ward level for Wales'") %> - <% end %> - ) + <%= render :partial => "summary_suggestion" %>) </div> </div> @@ -121,7 +116,7 @@ will be <strong>displayed publicly</strong> on this website forever (<a href="%s">why?</a>).') % [help_privacy_path+"#public_request"] %> <%= _('If you are thinking of using a pseudonym, - please <a href="%s">read this first</a>.') % [help_privacy_path+"#public_request"] %> + please <a href="%s">read this first</a>.') % [help_privacy_path+"#real_name"] %> </p> <% else %> <p class="form_note"> diff --git a/app/views/request/simple_correspondence.rhtml b/app/views/request/simple_correspondence.rhtml index bcbc795e7..0da9ef172 100644 --- a/app/views/request/simple_correspondence.rhtml +++ b/app/views/request/simple_correspondence.rhtml @@ -1,4 +1,4 @@ -<%= _('This is a plain-text version of the Freedom of Information request "{{request_title}}". The latest, full version is available online at {{full_url}}', :request_title => @info_request.title, :full_url => "http://#{MySociety::Config.get('DOMAIN')}#{show_request_path(:url_title=>@info_request.url_title)}") %>. +<%= _('This is a plain-text version of the Freedom of Information request "{{request_title}}". The latest, full version is available online at {{full_url}}', :request_title => @info_request.title, :full_url => "http://#{Configuration::domain}#{show_request_path(:url_title=>@info_request.url_title)}") %>. <% for info_request_event in @info_request_events %> <% diff --git a/app/views/request/upload_response.rhtml b/app/views/request/upload_response.rhtml index 697ff99aa..bc129426d 100644 --- a/app/views/request/upload_response.rhtml +++ b/app/views/request/upload_response.rhtml @@ -43,7 +43,7 @@ <p> <%= hidden_field_tag 'submitted_upload_response', 1 %> - <%= submit_tag "Upload FOI response" %> + <%= submit_tag _("Upload FOI response") %> <%= _(' (<strong>patience</strong>, especially for large files, it may take a while!)')%> </p> <% end %> diff --git a/app/views/user/_signin.rhtml b/app/views/user/_signin.rhtml index 4fe98ee41..c4d917991 100644 --- a/app/views/user/_signin.rhtml +++ b/app/views/user/_signin.rhtml @@ -9,27 +9,27 @@ <p> <label class="form_label" for="user_signin_email"><%= _('Your e-mail:')%></label> - <%= text_field 'user_signin', 'email', { :size => 20 } %> + <%= text_field 'user_signin', 'email', { :size => 20, :tabindex => 10 } %> </p> <p> <label class="form_label" for="user_signin_password"><%= _('Password:')%></label> - <%= password_field 'user_signin', 'password', { :size => 15 } %> + <%= password_field 'user_signin', 'password', { :size => 15, :tabindex => 20 } %> </p> <p class="form_note"> - <%= link_to _('Forgotten your password?'), signchangepassword_url + "?pretoken=" + h(params[:token]) %> + <%= link_to _('Forgotten your password?'), signchangepassword_url + "?pretoken=" + h(params[:token]), :tabindex => 30 %> </p> <p class="form_checkbox"> - <%= check_box_tag 'remember_me', "1" %> + <%= check_box_tag 'remember_me', "1", false, :tabindex => 40 %> <label for="remember_me"><%= _('Remember me</label> (keeps you signed in longer; do not use on a public computer) ')%></p> <div class="form_button"> <%= hidden_field_tag 'token', params[:token], {:id => 'signin_token' } %> <%= hidden_field_tag :modal, params[:modal], {:id => 'signin_modal' } %> - <%= submit_tag _('Sign in') %> + <%= submit_tag _('Sign in'), :tabindex => 50 %> </div> <% end %> diff --git a/app/views/user/_signup.rhtml b/app/views/user/_signup.rhtml index 9c0132f26..bb93b9617 100644 --- a/app/views/user/_signup.rhtml +++ b/app/views/user/_signup.rhtml @@ -7,7 +7,7 @@ <p> <label class="form_label" for="user_signup_email"><%= _('Your e-mail:')%></label> - <%= text_field 'user_signup', 'email', { :size => 20 } %> + <%= text_field 'user_signup', 'email', { :size => 20, :tabindex => 60 } %> </p> <div class="form_item_note"> <%= _('We will not reveal your email address to anybody unless you or @@ -16,7 +16,7 @@ <p> <label class="form_label" for="user_signup_name"> <%= _('Your name:')%></label> - <%= text_field 'user_signup', 'name', { :size => 20 } %> + <%= text_field 'user_signup', 'name', { :size => 20, :tabindex => 70 } %> </p> <div class="form_item_note"> <%= _('Your <strong>name will appear publicly</strong> @@ -28,12 +28,12 @@ <p> <label class="form_label" for="user_signup_password"> <%= _('Password:')%></label> - <%= password_field 'user_signup', 'password', { :size => 15 } %> + <%= password_field 'user_signup', 'password', { :size => 15, :tabindex => 80 } %> </p> <p> <label class="form_label" for="user_signup_password_confirmation"> <%= _('Password: (again)')%></label> - <%= password_field 'user_signup', 'password_confirmation', { :size => 15 } %> + <%= password_field 'user_signup', 'password_confirmation', { :size => 15, :tabindex => 90 } %> </p> <% if @request_from_foreign_country %> @@ -43,7 +43,7 @@ <div class="form_button"> <%= hidden_field_tag 'token', params[:token], {:id => 'signup_token' } %> <%= hidden_field_tag :modal, params[:modal], {:id => 'signup_modal' } %> - <%= submit_tag _('Sign up') %> + <%= submit_tag _('Sign up'), :tabindex => 100 %> </div> <% end %> diff --git a/app/views/user/rate_limited.rhtml b/app/views/user/rate_limited.rhtml index d5accf114..d52deebab 100644 --- a/app/views/user/rate_limited.rhtml +++ b/app/views/user/rate_limited.rhtml @@ -2,7 +2,7 @@ <h1><%=@title%></h1> -<p><%= _("You have hit the rate limit on new requests. Users are ordinarily limited to {{max_requests_per_user_per_day}} requests in any rolling 24-hour period. You will be able to make another request in {{can_make_another_request}}.", :max_requests_per_user_per_day => MySociety::Config.get("MAX_REQUESTS_PER_USER_PER_DAY"), :can_make_another_request => distance_of_time_in_words(Time.now, @next_request_permitted_at))%></p> +<p><%= _("You have hit the rate limit on new requests. Users are ordinarily limited to {{max_requests_per_user_per_day}} requests in any rolling 24-hour period. You will be able to make another request in {{can_make_another_request}}.", :max_requests_per_user_per_day => Configuration::max_requests_per_user_per_day, :can_make_another_request => distance_of_time_in_words(Time.now, @next_request_permitted_at))%></p> <p><%= _("There is a limit on the number of requests you can make in a day, because we don’t want public authorities to be bombarded with large numbers of inappropriate requests. If you feel you have a good reason to ask for the limit to be lifted in your case, please <a href='{{help_contact_path}}'>get in touch</a>.", :help_contact_path => help_contact_path) %></p> diff --git a/app/views/user/set_profile_about_me.rhtml b/app/views/user/set_profile_about_me.rhtml index 8d8b32758..4fe1047da 100644 --- a/app/views/user/set_profile_about_me.rhtml +++ b/app/views/user/set_profile_about_me.rhtml @@ -26,7 +26,7 @@ <%= _(' Include relevant links, such as to a campaign page, your blog or a twitter account. They will be made clickable. e.g.')%> - <a href="https://twitter.com/<%= MySociety::Config.get('TWITTER_USERNAME') %>">https://twitter.com/<%= MySociety::Config.get('TWITTER_USERNAME') %></a> + <a href="https://twitter.com/<%= Configuration::twitter_username %>">https://twitter.com/<%= Configuration::twitter_username %></a> </p> </div> |