aboutsummaryrefslogtreecommitdiffstats
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/admin_general/index.html.erb2
-rw-r--r--app/views/admin_request/edit.html.erb8
-rw-r--r--app/views/general/_frontpage_bodies_list.html.erb5
-rw-r--r--app/views/general/_frontpage_new_request.html.erb2
-rw-r--r--app/views/general/_frontpage_requests_list.html.erb5
-rw-r--r--app/views/general/_frontpage_search_box.html.erb3
-rw-r--r--app/views/general/_locale_switcher.html.erb2
-rw-r--r--app/views/general/_responsive_topnav.html.erb2
-rw-r--r--app/views/general/_topnav.html.erb4
-rw-r--r--app/views/public_body/_list_sidebar_extra.html.erb5
-rw-r--r--app/views/public_body/show.html.erb5
-rw-r--r--app/views/public_body/statistics.html.erb6
-rw-r--r--app/views/public_body_change_requests/new.html.erb5
-rw-r--r--app/views/request/_sidebar_request_listing.html.erb2
-rw-r--r--app/views/request/_view_html_stylesheet.html.erb9
-rw-r--r--app/views/request/upload_response.html.erb6
-rw-r--r--app/views/track_mailer/event_digest.text.erb8
-rw-r--r--app/views/user/_user_listing_single.html.erb2
-rw-r--r--app/views/user/show.html.erb2
19 files changed, 53 insertions, 30 deletions
diff --git a/app/views/admin_general/index.html.erb b/app/views/admin_general/index.html.erb
index 2202663be..f29258162 100644
--- a/app/views/admin_general/index.html.erb
+++ b/app/views/admin_general/index.html.erb
@@ -39,7 +39,7 @@
<% if message.get_body_for_quoting.strip.size == 0 %>
<%= link_to "(no body)", admin_request_show_raw_email_path(message.raw_email_id) %>
<% else %>
- <%= link_to excerpt(message.get_body_for_quoting, "", 60), admin_request_show_raw_email_path(message.raw_email_id) %>
+ <%= link_to excerpt(message.get_body_for_quoting, "", :radius => 60), admin_request_show_raw_email_path(message.raw_email_id) %>
<% end %>
</td>
<td class="span2">
diff --git a/app/views/admin_request/edit.html.erb b/app/views/admin_request/edit.html.erb
index 0e9c68aea..552b31bbb 100644
--- a/app/views/admin_request/edit.html.erb
+++ b/app/views/admin_request/edit.html.erb
@@ -33,7 +33,7 @@
<p><label for="info_request_tag_string"><strong>Tags</strong> <small>(space separated, can use key:value)</small></label><br/>
<%= text_field 'info_request', 'tag_string', :size => 60 %></p>
- <p><%= submit_tag 'Save changes', :accesskey => 's' %>
+ <p><%= submit_tag 'Save changes', :accesskey => 's', :class => 'btn btn-primary' %>
</p>
<p><strong>Note:</strong> To edit the actual request body text, click edit
@@ -49,13 +49,17 @@
<hr>
+<div class="well">
+
<%= form_tag admin_request_destroy_path(@info_request) do %>
<p>
- <strong>This is permanent and irreversible!</strong> <%= submit_tag 'Destroy request entirely' %>
+ <strong>This is permanent and irreversible!</strong> <%= submit_tag 'Destroy request entirely', :class => 'btn btn-danger' %>
<br>Use it mainly if someone posts private information, e.g. made a Data Protection request. It
destroys all responses and tracks as well.
</p>
<% end %>
+</div>
+
<hr>
diff --git a/app/views/general/_frontpage_bodies_list.html.erb b/app/views/general/_frontpage_bodies_list.html.erb
index 44321f14a..1c35c55ad 100644
--- a/app/views/general/_frontpage_bodies_list.html.erb
+++ b/app/views/general/_frontpage_bodies_list.html.erb
@@ -3,9 +3,10 @@
<div id="examples_0">
<h3><%= _("Who can I request information from?") %></h3>
<%= _("{{site_name}} covers requests to {{number_of_authorities}} authorities, including:",
- :site_name => site_name, :number_of_authorities => PublicBody.visible.count) %>
+ :site_name => site_name,
+ :number_of_authorities => number_with_delimiter(PublicBody.visible.count)) %>
<ul>
- <% for popular_body in popular_bodies %>
+ <% popular_bodies.each do |popular_body| %>
<li><%=public_body_link(popular_body)%>
<%= n_('{{count}} request', '{{count}} requests', popular_body.info_requests_count, :count => popular_body.info_requests_count) %>
</li>
diff --git a/app/views/general/_frontpage_new_request.html.erb b/app/views/general/_frontpage_new_request.html.erb
index 499b60eb5..5b987b320 100644
--- a/app/views/general/_frontpage_new_request.html.erb
+++ b/app/views/general/_frontpage_new_request.html.erb
@@ -4,4 +4,4 @@
Information<br/>
request</strong>") %>
</h1>
-<a class="link_button_green_large" href="<%= select_authority_path %>"><%= _("Start now &raquo;") %></a>
+<a class="link_button_green_large" href="<%= select_authority_path %>"><%= _("Make a request &raquo;") %></a>
diff --git a/app/views/general/_frontpage_requests_list.html.erb b/app/views/general/_frontpage_requests_list.html.erb
index d7d9184c4..39187f3f0 100644
--- a/app/views/general/_frontpage_requests_list.html.erb
+++ b/app/views/general/_frontpage_requests_list.html.erb
@@ -8,9 +8,10 @@
<% end %>
</h3>
<%= _("{{site_name}} users have made {{number_of_requests}} requests, including:",
- :site_name => site_name, :number_of_requests => InfoRequest.visible.count) %>
+ :site_name => site_name,
+ :number_of_requests => number_with_delimiter(InfoRequest.visible.count)) %>
<ul>
- <% for event in @request_events %>
+ <% @request_events.each do |event| %>
<li>
<% if @request_events_all_successful %>
<%= _("{{public_body_link}} answered a request about",
diff --git a/app/views/general/_frontpage_search_box.html.erb b/app/views/general/_frontpage_search_box.html.erb
index 890602416..f77bd97fc 100644
--- a/app/views/general/_frontpage_search_box.html.erb
+++ b/app/views/general/_frontpage_search_box.html.erb
@@ -2,7 +2,8 @@
<%= _("Search over<br/>
<strong>{{number_of_requests}} requests</strong> <span>and</span><br/>
<strong>{{number_of_authorities}} authorities</strong>",
- :number_of_requests => InfoRequest.visible.count, :number_of_authorities => PublicBody.visible.count) %>
+ :number_of_requests => number_with_delimiter(InfoRequest.visible.count),
+ :number_of_authorities => number_with_delimiter(PublicBody.visible.count)) %>
</h2>
<form id="search_form" method="post" action="<%= search_redirect_path %>">
<div>
diff --git a/app/views/general/_locale_switcher.html.erb b/app/views/general/_locale_switcher.html.erb
index a318f61f3..7b6377665 100644
--- a/app/views/general/_locale_switcher.html.erb
+++ b/app/views/general/_locale_switcher.html.erb
@@ -1,7 +1,7 @@
<% if FastGettext.default_available_locales.length > 1 && !params.empty? %>
<div id="user_locale_switcher">
<div class="btn-group">
- <% for possible_locale in FastGettext.default_available_locales %>
+ <% FastGettext.default_available_locales.each do |possible_locale| %>
<% if possible_locale == FastGettext.locale %>
<a href="#" class="btn disabled"><%= locale_name(possible_locale) %></a>
<% else %>
diff --git a/app/views/general/_responsive_topnav.html.erb b/app/views/general/_responsive_topnav.html.erb
index e726c17f4..0ece0da9a 100644
--- a/app/views/general/_responsive_topnav.html.erb
+++ b/app/views/general/_responsive_topnav.html.erb
@@ -6,7 +6,7 @@
</li>
<li class="<%= 'selected' if params[:controller] == 'request' and !['new', 'select_authority'].include?(params[:action]) %>">
- <%= link_to _("View requests"), request_list_successful_path %>
+ <%= link_to _("Browse requests"), request_list_successful_path %>
</li>
<li class="<%= 'selected' if params[:controller] == 'public_body' %>">
diff --git a/app/views/general/_topnav.html.erb b/app/views/general/_topnav.html.erb
index d37bd97d1..04ca07fa9 100644
--- a/app/views/general/_topnav.html.erb
+++ b/app/views/general/_topnav.html.erb
@@ -2,7 +2,9 @@
<ul id="navigation">
<li class="<%= 'selected' if params[:controller] == 'general' and params[:action] != 'blog' and params[:action] != 'search' %>"><%= link_to _("Home"), frontpage_path %></li>
<li class="<%= 'selected' if params[:controller] == 'request' and ['new', 'select_authority'].include?(params[:action]) %>"><%= link_to _("Make a request"), select_authority_path, :id => 'make-request-link' %></li>
- <li class="<%= 'selected' if params[:controller] == 'request' and !['new', 'select_authority'].include?(params[:action]) %>"><%= link_to _("View requests"), request_list_successful_path %></li>
+ <li class="<%= 'selected' if params[:controller] == 'request' and !['new', 'select_authority'].include?(params[:action]) %>">
+ <%= link_to _("Browse requests"), request_list_successful_path %>
+ </li>
<li class="<%= 'selected' if params[:controller] == 'public_body' %>"><%= link_to _("View authorities"), list_public_bodies_default_path %></li>
<% unless AlaveteliConfiguration::blog_feed.empty? %>
<li class="<%= 'selected' if params[:controller] == 'general' and params[:action] == 'blog' %>"><%= link_to _("Read blog"), blog_path %></li>
diff --git a/app/views/public_body/_list_sidebar_extra.html.erb b/app/views/public_body/_list_sidebar_extra.html.erb
index 290593d6a..6e683d7a1 100644
--- a/app/views/public_body/_list_sidebar_extra.html.erb
+++ b/app/views/public_body/_list_sidebar_extra.html.erb
@@ -1,3 +1,8 @@
+<% if AlaveteliConfiguration::public_body_statistics_page %>
+ <p>
+ <%= link_to _('Public authority statistics'), public_bodies_statistics_path %>
+ </p>
+<% end %>
<p>
<%= link_to _('Are we missing a public authority?'), help_requesting_path + '#missing_body' %>
</p>
diff --git a/app/views/public_body/show.html.erb b/app/views/public_body/show.html.erb
index a9c50e657..9352747ea 100644
--- a/app/views/public_body/show.html.erb
+++ b/app/views/public_body/show.html.erb
@@ -127,7 +127,10 @@
<% if @xapian_requests.results.empty? %>
<p><% _('There were no requests matching your query.') %></p>
<% else %>
- <p> <%= _('Only requests made using {{site_name}} are shown.', :site_name => site_name) %></p>
+ <p>
+ <%= _('Only requests made using {{site_name}} are shown.', :site_name => site_name) %>
+ <%= link_to _('?'), help_about_path %>
+ </p>
<% end %>
<% else %>
diff --git a/app/views/public_body/statistics.html.erb b/app/views/public_body/statistics.html.erb
index d935a9e47..0e7e7424e 100644
--- a/app/views/public_body/statistics.html.erb
+++ b/app/views/public_body/statistics.html.erb
@@ -1,6 +1,6 @@
<% @title = _("Public Body Statistics") %>
<div id="main_content">
- <h1>Public Body Statistics</h1>
+ <h1><%= @title %></h1>
<p><%= _("This page of public body statistics is currently \
experimental, so there are some caveats that should be borne \
@@ -33,6 +33,8 @@ requests to the authority through this site, rather than, \
say, all requests that have been made to the public body by \
any means.") %></li>
+ <li><%= _("Unclassified or hidden requests are not counted.") %></li>
+
</ul>
<p><%= _("These graphs were partly inspired by \
@@ -47,7 +49,7 @@ are due to him.") %></p>
<table border=0>
<thead>
<tr>
- <th>Public Body</th>
+ <th><%= _('Public Body') %></th>
<th><%= graph_data['y_axis'] %></th>
</tr>
</thead>
diff --git a/app/views/public_body_change_requests/new.html.erb b/app/views/public_body_change_requests/new.html.erb
index 7079cd868..b52d583be 100644
--- a/app/views/public_body_change_requests/new.html.erb
+++ b/app/views/public_body_change_requests/new.html.erb
@@ -54,6 +54,11 @@
<%= f.text_area :notes, :rows => 10, :cols => 60 %>
</p>
+ <p style="display:none;">
+ <%= label_tag 'public_body_change_request[comment]', _('Do not fill in this field') %>
+ <%= text_field_tag 'public_body_change_request[comment]' %>
+ </p>
+
<div class="form_button">
<%= submit_tag _("Submit request") %>
</div>
diff --git a/app/views/request/_sidebar_request_listing.html.erb b/app/views/request/_sidebar_request_listing.html.erb
index ec5a5813d..64fe39341 100644
--- a/app/views/request/_sidebar_request_listing.html.erb
+++ b/app/views/request/_sidebar_request_listing.html.erb
@@ -4,7 +4,7 @@
<%= request_link(info_request) %>
</span>
<span class="desc">
- <%=h excerpt(info_request.initial_request_text, "", 100) %>
+ <%=h excerpt(info_request.initial_request_text, "", :radius => 100) %>
</span>
<span class="bottomline">
<strong>
diff --git a/app/views/request/_view_html_stylesheet.html.erb b/app/views/request/_view_html_stylesheet.html.erb
index f3d8799da..09f295346 100644
--- a/app/views/request/_view_html_stylesheet.html.erb
+++ b/app/views/request/_view_html_stylesheet.html.erb
@@ -1,17 +1,16 @@
<% if AlaveteliConfiguration::responsive_styling || params[:responsive] %>
<!--[if LTE IE 7]>
- <link href="/assets/responsive/application-lte-ie7.css" media="all" rel="stylesheet" title="Main" type="text/css" />
+ <link href="/assets/responsive/application-lte-ie7.css" media="all" rel="stylesheet" title="Main" type="text/css" charset="UTF-8" />
<![endif]-->
<!--[if IE 8]>
- <link href="/assets/responsive/application-ie8.css" media="all" rel="stylesheet" title="Main" type="text/css" />
+ <link href="/assets/responsive/application-ie8.css" media="all" rel="stylesheet" title="Main" type="text/css" charset="UTF-8" />
<![endif]-->
<!--[if GT IE 8]><!-->
- <link href="/assets/responsive/application.css" media="all" rel="stylesheet" title="Main" type="text/css" />
+ <link href="/assets/responsive/application.css" media="all" rel="stylesheet" title="Main" type="text/css" charset="UTF-8" />
<!--<![endif]-->
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<% else %>
- <link type="text/css" title="Main" rel="stylesheet" media="screen" href="/assets/application.css">
-
+ <link type="text/css" title="Main" rel="stylesheet" media="screen" href="/assets/application.css" charset="UTF-8" />
<% end %>
diff --git a/app/views/request/upload_response.html.erb b/app/views/request/upload_response.html.erb
index f5fd6f000..f07af34d5 100644
--- a/app/views/request/upload_response.html.erb
+++ b/app/views/request/upload_response.html.erb
@@ -9,7 +9,9 @@
<%= foi_error_messages_for :comment %>
- <h1><%= _('Respond to the FOI request')%> '<%=request_link(@info_request)%>'<% _(' made by ')%><%=user_link(@info_request.user) %></h1>
+ <h1><%= _("Respond to the FOI request '{{request}}' made by {{user}}",
+ :request => request_link(@info_request),
+ :user => user_link(@info_request.user)) %></h1>
<p>
<%= 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)) %>
@@ -48,5 +50,3 @@
</p>
<% end %>
<% end %>
-
-
diff --git a/app/views/track_mailer/event_digest.text.erb b/app/views/track_mailer/event_digest.text.erb
index b83c184f0..f6e699e41 100644
--- a/app/views/track_mailer/event_digest.text.erb
+++ b/app/views/track_mailer/event_digest.text.erb
@@ -4,7 +4,7 @@
for track_thing, alert_results, xapian_object in @email_about_things
main_text += track_thing.params[:title_in_email] + "\n"
main_text += ("=" * track_thing.params[:title_in_email].size) + "\n\n"
- @highlight_words = xapian_object.words_to_highlight
+ @highlight_words = xapian_object.words_to_highlight(:regex => true)
for result in alert_results.reverse
if result[:model].class.to_s == "InfoRequestEvent"
event = result[:model]
@@ -17,14 +17,14 @@
# e.g. Julian Burgess sent a request to Royal Mail Group (15 May 2008)
if event.event_type == 'response'
- url = incoming_message_url(event.incoming_message)
+ url = incoming_message_url(event.incoming_message, :cachebust => true)
main_text += _("{{public_body}} sent a response to {{user_name}}", :public_body => event.info_request.public_body.name, :user_name => event.info_request.user_name)
elsif event.event_type == 'followup_sent'
- url = outgoing_message_url(event.outgoing_message)
+ url = outgoing_message_url(event.outgoing_message, :cachebust => true)
main_text += _("{{user_name}} sent a follow up message to {{public_body}}", :user_name => event.info_request.user_name, :public_body => event.info_request.public_body.name)
elsif event.event_type == 'sent'
# this is unlikely to happen in real life, but happens in the test code
- url = outgoing_message_url(event.outgoing_message)
+ url = outgoing_message_url(event.outgoing_message, :cachebust => true)
main_text += _("{{user_name}} sent a request to {{public_body}}", :user_name => event.info_request.user_name, :public_body => event.info_request.public_body.name)
elsif event.event_type == 'comment'
url = comment_url(event.comment)
diff --git a/app/views/user/_user_listing_single.html.erb b/app/views/user/_user_listing_single.html.erb
index ed1b95718..3cb0d283f 100644
--- a/app/views/user/_user_listing_single.html.erb
+++ b/app/views/user/_user_listing_single.html.erb
@@ -18,7 +18,7 @@ end %>
<span class="bottomline">
<%= pluralize(display_user.info_requests.size, "request") %> <%= _('made.')%>
<%= pluralize(display_user.visible_comments.size, "annotation") %> <%= _('made.')%>
- <%= _('Joined in')%> <%= year_from_date(display_user.created_at) %>.
+ <%= _('Joined in')%> <%= display_user.created_at.year %>.
</span>
</div>
diff --git a/app/views/user/show.html.erb b/app/views/user/show.html.erb
index ce328b46f..7ae577565 100644
--- a/app/views/user/show.html.erb
+++ b/app/views/user/show.html.erb
@@ -64,7 +64,7 @@
<h1> <%= h(@display_user.name) + (@is_you ? _(" (you)") : "") %></h1>
<p class="subtitle">
- <%= _('Joined {{site_name}} in', :site_name=>site_name) %> <%= year_from_date(@display_user.created_at) %>
+ <%= _('Joined {{site_name}} in', :site_name=>site_name) %> <%= @display_user.created_at.year %>
<% if !@user.nil? && @user.admin_page_links? %>
(<%= link_to "admin", admin_user_show_path(@display_user) %>)
<% end %>