aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/controllers/request_controller.rb2
-rw-r--r--app/models/incoming_message.rb5
-rw-r--r--app/models/info_request.rb2
-rw-r--r--app/views/general/_frontpage_intro_sentence.rhtml3
-rw-r--r--app/views/general/blog.rhtml7
-rw-r--r--app/views/general/frontpage.rhtml4
-rw-r--r--app/views/help/_why_they_should_reply_by_email.rhtml3
-rw-r--r--app/views/request/_view_html_prefix.rhtml2
-rw-r--r--app/views/request/show_response.rhtml4
-rw-r--r--app/views/user/set_profile_about_me.rhtml2
-rw-r--r--app/views/user/show.rhtml2
11 files changed, 19 insertions, 17 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index dff03983b..42d54a403 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/request_controller.rb
@@ -393,7 +393,7 @@ class RequestController < ApplicationController
flash[:notice] = _("<p>Thank you! Hope you don't have to wait much longer.</p> <p>By law, you should have got a response promptly, and normally before the end of <strong>{{date_response_required_by}}</strong>.</p>",:date_response_required_by=>simple_date(@info_request.date_response_required_by))
redirect_to request_url(@info_request)
elsif @info_request.calculate_status == 'waiting_response_very_overdue'
- flash[:notice] = _("<p>Thank you! Your request is long overdue, by more than 40 working days. Most requests should be answered within 20 working days. You might like to complain about this, see below.</p>")
+ flash[:notice] = _("<p>Thank you! Your request is long overdue, by more than {{very_late_number_of_days}} working days. Most requests should be answered within {{late_number_of_days}} working days. You might like to complain about this, see below.</p>", :very_late_number_of_days => MySociety::Config.get('REPLY_VERY_LATE_AFTER_DAYS', 40), :late_number_of_days => MySociety::Config.get('REPLY_LATE_AFTER_DAYS', 20))
redirect_to unhappy_url(@info_request)
elsif @info_request.calculate_status == 'not_held'
flash[:notice] = _("<p>Thank you! Here are some ideas on what to do next:</p>
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb
index ae7d1201e..b0b02fdda 100644
--- a/app/models/incoming_message.rb
+++ b/app/models/incoming_message.rb
@@ -569,7 +569,8 @@ class IncomingMessage < ActiveRecord::Base
text.gsub!(/(Complaints and Corporate Affairs Officer)\s+Westminster Primary Care Trust.+/ms, "\\1")
# Remove WhatDoTheyKnow signup links
- text.gsub!(/http:\/\/www.whatdotheyknow.com\/c\/[^\s]+/, "[WDTK login link]")
+ domain = MySociety::Config.get('DOMAIN')
+ text.gsub!(/http:\/\/#{domain}\/c\/[^\s]+/, "[WDTK login link]")
# Remove Home Office survey links
# e.g. http://www.whatdotheyknow.com/request/serious_crime_act_2007_section_7#incoming-12650
@@ -1134,7 +1135,7 @@ class IncomingMessage < ActiveRecord::Base
elsif content_type == 'text/html'
# lynx wordwraps links in its output, which then don't get formatted properly
# by Alaveteli. We use elinks instead, which doesn't do that.
- external_command("/usr/bin/elinks", "-dump-charset", "utf-8", "-force-html", "-dump",
+ external_command("/usr/bin/elinks", "-eval", "'set document.codepage.assume = \"utf-8\"'", "-dump-charset", "utf-8", "-force-html", "-dump",
tempfile.path, :append_to => text)
elsif content_type == 'application/vnd.ms-excel'
# Bit crazy using /usr/bin/strings - but xls2csv, xlhtml and
diff --git a/app/models/info_request.rb b/app/models/info_request.rb
index 419546c99..c667e1499 100644
--- a/app/models/info_request.rb
+++ b/app/models/info_request.rb
@@ -651,6 +651,8 @@ public
# days is a very long time.
def date_very_overdue_after
last_sent = last_event_forming_initial_request
+ very_late_days_later = MySociety::Config.get('REPLY_VERY_LATE_AFTER_DAYS', 40)
+ school_very_late_days_later = MySociety::Config.get('SPECIAL_REPLY_VERY_LATE_AFTER_DAYS', 60)
if self.public_body.is_school?
# schools have 60 working days maximum (even over a long holiday)
return Holiday.due_date_from(self.date_initial_request_last_sent_at, 60)
diff --git a/app/views/general/_frontpage_intro_sentence.rhtml b/app/views/general/_frontpage_intro_sentence.rhtml
new file mode 100644
index 000000000..2c3bcaf83
--- /dev/null
+++ b/app/views/general/_frontpage_intro_sentence.rhtml
@@ -0,0 +1,3 @@
+First, type in the <strong>name of the UK public authority</strong> you'd
+<br>like information from. <strong>By law, they have to respond</strong>
+(<a href="<%= help_about_url %>">why?</a>).
diff --git a/app/views/general/blog.rhtml b/app/views/general/blog.rhtml
index cbd37240e..c9387c24f 100644
--- a/app/views/general/blog.rhtml
+++ b/app/views/general/blog.rhtml
@@ -1,8 +1,8 @@
<% @title = "#{site_name} blog and tweets" %>
<h1><%=@title %></h1>
- <img src="/images/twitter.png" alt="twitter icon" valign="middle"> <a href="http://www.twitter.com/whatdotheyknow">Follow us on twitter</a>&nbsp;
- <img src="/images/rss.png" alt="RSS icon" valign="middle"> <a href="http://www.mysociety.org/category/projects/whatdotheyknow/feed/">Subscribe to blog</a>
+ <img src="/images/twitter.png" alt="twitter icon" valign="middle"> <a href="http://www.twitter.com/<%= MySociety::Config.get('TWITTER_USERNAME') %>">Follow us on twitter</a>&nbsp;
+ <img src="/images/rss.png" alt="RSS icon" valign="middle"> <a href="<%= MySociety::Config.get('BLOG_FEED') %>">Subscribe to blog</a>
<% if !@twitter_user.empty? %>
<div id="twitter">
<script src="http://widgets.twimg.com/j/2/widget.js"></script>
@@ -52,8 +52,5 @@ new TWTR.Widget({
</p>
</div>
<% end %>
- <p>
- <a href="http://www.mysociety.org/category/projects/whatdotheyknow/">All blog posts</a>
- </p>
</div>
diff --git a/app/views/general/frontpage.rhtml b/app/views/general/frontpage.rhtml
index e8e5d8634..abed0294e 100644
--- a/app/views/general/frontpage.rhtml
+++ b/app/views/general/frontpage.rhtml
@@ -5,9 +5,7 @@
<% form_tag({:action => "search_redirect"}, {:id => "search_form"}) do %>
<p>
- <%= _('First, type in the <strong>name of the UK public authority</strong> you\'d
- <br>like information from. <strong>By law, they have to respond</strong>
- (<a href="%s">why?</a>).') % help_about_url %>
+ <%= render :partial => 'frontpage_intro_sentence' %>
<br>
<br>
diff --git a/app/views/help/_why_they_should_reply_by_email.rhtml b/app/views/help/_why_they_should_reply_by_email.rhtml
new file mode 100644
index 000000000..faaa2b2e2
--- /dev/null
+++ b/app/views/help/_why_they_should_reply_by_email.rhtml
@@ -0,0 +1,3 @@
+The law, the Ministry of Justice and the Information Commissioner all say that an email is sufficient (<a href="<%= help_page_url %>#full_address">more details</a>).
+
+At the bottom of this page, write a reply to the authority explaining this to them.
diff --git a/app/views/request/_view_html_prefix.rhtml b/app/views/request/_view_html_prefix.rhtml
index 6d352ea91..b29830ac7 100644
--- a/app/views/request/_view_html_prefix.rhtml
+++ b/app/views/request/_view_html_prefix.rhtml
@@ -1,6 +1,6 @@
<div class="view_html_prefix">
<div class="view_html_logo">
- <a href="/"><img src="/images/navimg/logo-trans-small.png" alt="<%= site_name %> logo"></a>
+ <a href="/"><img src="/images/navimg/logo-trans-small.png" alt="<%= site_name %>"></a>
</div>
<div class="view_html_download_link">
<%=link_to _("Download original attachment"), @attachment_url %>
diff --git a/app/views/request/show_response.rhtml b/app/views/request/show_response.rhtml
index 40c3b3d5b..d8647d1ec 100644
--- a/app/views/request/show_response.rhtml
+++ b/app/views/request/show_response.rhtml
@@ -19,9 +19,7 @@
address</strong>, not just an email, for it to be a valid FOI request') %>
</dt>
<dd>
- <%= _('The law, the Ministry of Justice and the Information Commissioner
- all say that an email is sufficient (<a href="%s">more details</a>).
- At the bottom of this page, write a reply to the authority explaining this to them.') % [help_privacy_path + '#full_address'] %>
+ <%= render :partial => 'help/why_they_should_reply_by_email', :locals => {:help_page_url => help_privacy_path } %>
</dd>
<dt>
diff --git a/app/views/user/set_profile_about_me.rhtml b/app/views/user/set_profile_about_me.rhtml
index af6433e89..6c1edc254 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="http://www.twitter.com/whatdotheyknow">http://www.twitter.com/whatdotheyknow</a>
+ <a href="http://www.twitter.com/<%= MySociety::Config.get('TWITTER_USERNAME') %>">http://www.twitter.com/<%= MySociety::Config.get('TWITTER_USERNAME') %></a>
</p>
</div>
diff --git a/app/views/user/show.rhtml b/app/views/user/show.rhtml
index 5e2c29d84..c3a99311a 100644
--- a/app/views/user/show.rhtml
+++ b/app/views/user/show.rhtml
@@ -110,7 +110,7 @@
<% if not @is_you %>
<p id="user_not_logged_in">
- <%= link_to _('Sign in'), signin_url(:r => request.request_uri) %><%= _('to change password,
+ <%= link_to _('Sign in'), signin_url(:r => request.request_uri) %> <%= _('to change password,
subscriptions and more')%> (<%=h @display_user.name %> <%= _('only')%>)
</p>
<% end %>