diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/comment/_comment_form.rhtml | 1 | ||||
-rw-r--r-- | app/views/general/frontpage.rhtml | 4 | ||||
-rw-r--r-- | app/views/general/search.rhtml | 23 | ||||
-rw-r--r-- | app/views/layouts/admin.rhtml | 3 | ||||
-rw-r--r-- | app/views/layouts/default.rhtml | 2 | ||||
-rw-r--r-- | app/views/public_body/show.rhtml | 2 | ||||
-rw-r--r-- | app/views/request/_followup.rhtml | 5 | ||||
-rw-r--r-- | app/views/request/new.rhtml | 4 | ||||
-rw-r--r-- | app/views/track_mailer/event_digest.rhtml | 2 |
9 files changed, 22 insertions, 24 deletions
diff --git a/app/views/comment/_comment_form.rhtml b/app/views/comment/_comment_form.rhtml index 8ca30324c..d430f25c8 100644 --- a/app/views/comment/_comment_form.rhtml +++ b/app/views/comment/_comment_form.rhtml @@ -1,7 +1,6 @@ <% form_for(:comment, @comment, :url => { :controller => "comment", :action => "new", :type => "request" }, :html => { :id => 'comment_form' } ) do |f| %> <p> <%= f.text_area :body, :rows => 10, :cols => 55 %> - <br><script type="text/javascript">document.write('<input name="doSpell" type="button" value="Check spelling" onClick="openSpellChecker(document.getElementById(\'comment_form\').body);"/> (optional)')</script> </p> <% if !TrackThing.find_by_existing_track(@user, track_thing) && (!@user || @info_request.user != @user) %> diff --git a/app/views/general/frontpage.rhtml b/app/views/general/frontpage.rhtml index 032a8b222..f1bee3ba1 100644 --- a/app/views/general/frontpage.rhtml +++ b/app/views/general/frontpage.rhtml @@ -16,8 +16,8 @@ <%= submit_tag _('Search') %> <br> <%= _('e.g.') %> - <% @popular_bodies.each_with_index do |body, i| %> - <%=link_to body.name, search_url(body.name, 'bodies')%><% if i < 2 %>, <% else %>. <% break %><% end %> + <% @search_examples.each_with_index do |name, i| %> + <%=link_to name, search_url(name, 'bodies')%><% if i < 2 %>, <% else %>. <% break %><% end %> <% end %> <br> diff --git a/app/views/general/search.rhtml b/app/views/general/search.rhtml index 876d54270..a4680c0f6 100644 --- a/app/views/general/search.rhtml +++ b/app/views/general/search.rhtml @@ -4,7 +4,7 @@ <% @title = _("Search Freedom of Information requests, public authorities and users") %> <h1><%=@title%></h1> <% elsif @total_hits == 0 %> - <%= _("Nothing found for '{{search_terms}}'", :search_terms => h(@query)) %> + <%= _("Nothing found for ‘{{search_terms}}’", :search_terms => h(@query)) %> <% else %> <% @title = _("Results page {{page_number}}", :page_number => @page.to_s) %> <% end%> @@ -67,7 +67,11 @@ <% end %> <% if @xapian_bodies.results.size > 0 %> - <h1><%= _('Public authorities {{start_count}} to {{end_count}} of {{total_count}} for {{user_search_query}}', :start_count => ((@page-1)*@bodies_per_page+1).to_s, :end_count => [@page*@bodies_per_page, @xapian_bodies.matches_estimated].min.to_s, :total_count => @xapian_bodies.matches_estimated.to_s, :user_search_query => h(@query)) %></h1> + <% if @xapian_bodies.results.size == 1 && @page == 1 %> + <h1><%= _('One public authority matching ‘{{user_search_query}}’', :user_search_query => h(@query)) %></h1> + <% else %> + <h1><%= _('Public authorities {{start_count}} to {{end_count}} of {{total_count}} for {{user_search_query}}', :start_count => ((@page-1)*@bodies_per_page+1).to_s, :end_count => [@page*@bodies_per_page, @xapian_bodies.matches_estimated].min.to_s, :total_count => @xapian_bodies.matches_estimated.to_s, :user_search_query => h(@query)) %></h1> + <% end %> <% for result in @xapian_bodies.results %> <%= render :partial => 'public_body/body_listing_single', :locals => { :public_body => result[:model] } %> @@ -77,7 +81,11 @@ <% end %> <% if @xapian_users.results.size > 0 %> - <h1><%= _("People {{start_count}} to {{end_count}} of {{total_count}} for {{user_search_query}}", :start_count => ((@page-1)*@users_per_page+1).to_s, :end_count => [@page*@users_per_page, @xapian_users.matches_estimated].min.to_s, :total_count => @xapian_users.matches_estimated.to_s, :user_search_query => h(@query)) %></h1> + <% if @xapian_users.results.size == 1 && @page == 1 %> + <h1><%= _("One person matching ‘{{user_search_query}}’", :user_search_query => h(@query)) %></h1> + <% else %> + <h1><%= _("People {{start_count}} to {{end_count}} of {{total_count}} for ‘{{user_search_query}}’", :start_count => ((@page-1)*@users_per_page+1).to_s, :end_count => [@page*@users_per_page, @xapian_users.matches_estimated].min.to_s, :total_count => @xapian_users.matches_estimated.to_s, :user_search_query => h(@query)) %></h1> + <% end %> <% for result in @xapian_users.results %> <%= render :partial => 'user/user_listing_single', :locals => { :display_user => result[:model] } %> @@ -87,7 +95,11 @@ <% end %> <% if @xapian_requests.results.size > 0 %> - <h1><%= _("FOI requests {{start_count}} to {{end_count}} of {{total_count}} for {{user_search_query}}", :start_count => ((@page-1)*@requests_per_page+1).to_s, :end_count => [@page*@requests_per_page, @xapian_requests.matches_estimated].min.to_s, :total_count => @xapian_requests.matches_estimated.to_s, :user_search_query => h(@query)) %></h1> + <% if @xapian_requests.results.size == 1 && @page == 1 %> + <h1><%= _("One FOI request matching ‘{{user_search_query}}’", :user_search_query => h(@query)) %></h1> + <% else %> + <h1><%= _("FOI requests {{start_count}} to {{end_count}} of {{total_count}} for ‘{{user_search_query}}’", :start_count => ((@page-1)*@requests_per_page+1).to_s, :end_count => [@page*@requests_per_page, @xapian_requests.matches_estimated].min.to_s, :total_count => @xapian_requests.matches_estimated.to_s, :user_search_query => h(@query)) %></h1> + <% end %> <% if @track_thing %> <%= render :partial => 'track/tracking_links', :locals => { :track_thing => @track_thing, :own_request => false, :location => 'main' } %> @@ -117,7 +129,7 @@ <li><%= _('<strong><code>requested_by:julian_todd</code></strong> to search requests made by Julian Todd, typing the name as in the URL.') %></li> <li><%= _('<strong><code>commented_by:tony_bowden</code></strong> to search annotations made by Tony Bowden, typing the name as in the URL.')%></li> <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_extentions)%></li> + <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, and tag values, e.g. <code>tag:openlylocal AND tag:financial_transaction:335633</code>. Note that by default any of the tags @@ -126,7 +138,6 @@ </ul> <h2 id="statuses"><%= _('Table of statuses') %></h2> - <h3>XXX this should be automatically generated</h3> <table class="status_table"> <tr><td><strong><%=search_link('status:waiting_response')%></strong></td><td> Waiting for the public authority to reply </td></tr> <tr><td><strong><%=search_link('status:not_held')%></strong></td><td> The public authority does not have the information requested </td></tr> diff --git a/app/views/layouts/admin.rhtml b/app/views/layouts/admin.rhtml index a209715e1..5fe75fc97 100644 --- a/app/views/layouts/admin.rhtml +++ b/app/views/layouts/admin.rhtml @@ -8,12 +8,11 @@ <body> <p> - <strong><%= link_to 'WhatDoTheyKnow', main_url('/') %> admin:</strong> + <strong><%= link_to 'Alaveteli', main_url('/') %> admin:</strong> <%= link_to 'Summary', admin_general_index_path %> | <%= link_to 'Timeline', admin_timeline_path %> | <%= link_to 'Stats', admin_stats_path %> | <%= link_to 'Debug', admin_debug_path %> - | <%= link_to 'Wiki', "https://secure.mysociety.org/intranet/ProductionSites/WhatDoTheyKnow/WebHome" %> <strong>View:</strong> <%= link_to 'Authorities', admin_body_list_path %> | <%= link_to 'Requests', admin_request_list_path %> diff --git a/app/views/layouts/default.rhtml b/app/views/layouts/default.rhtml index 8b6ce4f1a..c193d0c1b 100644 --- a/app/views/layouts/default.rhtml +++ b/app/views/layouts/default.rhtml @@ -1,8 +1,6 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html lang="<%= I18n.locale %>"> <head> - <script type="text/javascript" src="/jslib/spell/spellChecker.js"></script> - <% if @profile_photo_javascript %> <script type="text/javascript" src="/javascripts/jquery.js"></script> <script type="text/javascript" src="/javascripts/jquery.Jcrop.js"></script> diff --git a/app/views/public_body/show.rhtml b/app/views/public_body/show.rhtml index d3c299140..dce7ca4f8 100644 --- a/app/views/public_body/show.rhtml +++ b/app/views/public_body/show.rhtml @@ -11,7 +11,6 @@ <% end %> <% if @public_body.has_tag?("charity") %> <% for tag_value in @public_body.get_tag_values("charity") %> - XXX UK-specific <% if tag_value.match(/^SC/) %> <%= link_to _('Charity registration'), "http://www.oscr.org.uk/CharityIndexDetails.aspx?id=" + tag_value %><br> <% else %> @@ -68,7 +67,6 @@ <% if @xapian_requests.results.empty? %> <% if @public_body.eir_only? %> <h2><%= _('Environmental Information Regulations requests made using this site') %></h2> - <h4><%= _('XXX this section needs localising re EIR as these are specific to UK law') %></h4> <p>Nobody has made any Environmental Information Regulations requests to <%=h(@public_body.name)%> using this site yet.</p> <% else %> <h2><%= _('Freedom of Information requests made using this site')%></h2> diff --git a/app/views/request/_followup.rhtml b/app/views/request/_followup.rhtml index 393233682..8c279d234 100644 --- a/app/views/request/_followup.rhtml +++ b/app/views/request/_followup.rhtml @@ -53,7 +53,6 @@ <% form_for(:outgoing_message, @outgoing_message, :html => { :id => 'followup_form' }, :url => incoming_message.nil? ? show_response_no_followup_url(:id => @info_request.id) : show_response_url(:id => @info_request.id, :incoming_message_id => incoming_message.id)) do |o| %> <p> <%= o.text_area :body, :rows => 15, :cols => 55 %> - <br><script type="text/javascript">document.write('<input name="doSpell" type="button" value="Check spelling" onClick="openSpellChecker(document.getElementById(\'followup_form\').body);"/> (optional)')</script> </p> <% if @internal_review %> @@ -62,9 +61,9 @@ <h3><%= _('What are you doing?') %></h3> <% if !@outgoing_message.errors[:what_doing_dummy].nil? %> - <div class="fieldWithErrors"> + <div class="fieldWithErrors"> <% else %> - <div> + <div> <% end %> <!-- <div> diff --git a/app/views/request/new.rhtml b/app/views/request/new.rhtml index 5925ca3fb..a97116aa3 100644 --- a/app/views/request/new.rhtml +++ b/app/views/request/new.rhtml @@ -110,10 +110,6 @@ <%= o.text_area :body, :rows => 20, :cols => 60 %> </p> <% end %> - - <div class="form_button"> - <script type="text/javascript">document.write('<input name="doSpell" type="button" value="Check spelling" onClick="openSpellChecker(document.getElementById(\'write_form\').body);"/> (optional)')</script> - </div> <% if !@user %> <p class="form_note"> diff --git a/app/views/track_mailer/event_digest.rhtml b/app/views/track_mailer/event_digest.rhtml index e40dd5d3f..df27a5cbd 100644 --- a/app/views/track_mailer/event_digest.rhtml +++ b/app/views/track_mailer/event_digest.rhtml @@ -57,8 +57,6 @@ main_text += "\n" end - #STDERR.puts main_text - #STDERR.puts @unsubscribe_url %><%=main_text%>Alter your subscription ======================= |