aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rwxr-xr-xapp/helpers/link_to_helper.rb2
-rw-r--r--app/models/incoming_message.rb4
-rw-r--r--app/views/request/show.rhtml17
-rw-r--r--app/views/request_mailer/old_unclassified_updated.rhtml2
-rw-r--r--app/views/request_mailer/overdue_alert.rhtml2
5 files changed, 17 insertions, 10 deletions
diff --git a/app/helpers/link_to_helper.rb b/app/helpers/link_to_helper.rb
index 935912a61..6d8ae345e 100755
--- a/app/helpers/link_to_helper.rb
+++ b/app/helpers/link_to_helper.rb
@@ -162,7 +162,7 @@ module LinkToHelper
# Admin pages
def admin_url(relative_path)
- admin_url_prefix = admin_general_index_path+"/"
+ admin_url_prefix = MySociety::Config.get("ADMIN_BASE_URL", admin_general_index_path+"/")
return admin_url_prefix + relative_path
end
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb
index 0ad668afb..581c73f8b 100644
--- a/app/models/incoming_message.rb
+++ b/app/models/incoming_message.rb
@@ -1146,7 +1146,7 @@ class IncomingMessage < ActiveRecord::Base
# recurse into zip files
begin
zip_file = Zip::ZipFile.open(tempfile.path)
- text += _get_attachment_text_from_zip_file(zip_file)
+ text += IncomingMessage._get_attachment_text_from_zip_file(zip_file)
zip_file.close()
rescue
$stderr.puts("Error processing zip file: #{$!.inspect}")
@@ -1157,7 +1157,7 @@ class IncomingMessage < ActiveRecord::Base
return text
end
- def _get_attachment_text_from_zip_file(zip_file)
+ def IncomingMessage._get_attachment_text_from_zip_file(zip_file)
text = ""
for entry in zip_file
if entry.file?
diff --git a/app/views/request/show.rhtml b/app/views/request/show.rhtml
index c8f5f3eed..7c3f79368 100644
--- a/app/views/request/show.rhtml
+++ b/app/views/request/show.rhtml
@@ -32,11 +32,18 @@
<% end %>
<p class="subtitle">
- <%= _('{{user}} made this {{law_used_full}} request',:user=>user_link(@info_request.user), :law_used_full=>h(@info_request.law_used_full)) %>
- <% if !@user.nil? && @user.admin_page_links? %>
- (<%= link_to "admin", request_admin_url(@info_request) %>)
- <% end %>
- <%= _('to {{public_body}}',:public_body=>public_body_link(@info_request.public_body)) %>
+ <% if !@user.nil? && @user.admin_page_links? %>
+ <%= _('{{user}} (<a href="{{user_admin_url}}">admin</a>) made this {{law_used_full}} request (<a href="{{request_admin_url}}">admin</a>) to {{public_body_link}} (<a href="{{public_body_admin_url}}">admin</a>)',
+ :user => user_link(@info_request.user),
+ :law_used_full => h(@info_request.law_used_full),
+ :user_admin_url => user_admin_url(@info_request.user),
+ :request_admin_url => request_admin_url(@info_request),
+ :public_body_link => public_body_link(@info_request.public_body),
+ :public_body_admin_url => public_body_admin_url(@info_request.public_body)) %>
+ <% else %>
+ <%= _('{{user}} made this {{law_used_full}} request',:user=>user_link(@info_request.user), :law_used_full=>h(@info_request.law_used_full)) %>
+ <%= _('to {{public_body}}',:public_body=>public_body_link(@info_request.public_body)) %>
+ <% end %>
</p>
<p id="request_status" class="request_icon_line icon_<%= @info_request.calculate_status %>">
diff --git a/app/views/request_mailer/old_unclassified_updated.rhtml b/app/views/request_mailer/old_unclassified_updated.rhtml
index b03780016..afaa0cf1c 100644
--- a/app/views/request_mailer/old_unclassified_updated.rhtml
+++ b/app/views/request_mailer/old_unclassified_updated.rhtml
@@ -1,7 +1,7 @@
<%= _('To help us keep the site tidy, someone else has updated the status of the
{{law_used_full}} request {{title}} that you made to {{public_body}}, to "{{display_status}}" If you disagree with their categorisation, please update the status again yourself to what you believe to be more accurate.',:law_used_full=>@info_request.law_used_full,:title=>@info_request.title, :public_body=>@info_request.public_body.name,:display_status=>@info_request.display_status.downcase)%>
-<%=_ ('Follow this link to see the request:')%>
+<%=_('Follow this link to see the request:')%>
<%= @url %>
diff --git a/app/views/request_mailer/overdue_alert.rhtml b/app/views/request_mailer/overdue_alert.rhtml
index 65ae207a2..70b6ffcf1 100644
--- a/app/views/request_mailer/overdue_alert.rhtml
+++ b/app/views/request_mailer/overdue_alert.rhtml
@@ -1,6 +1,6 @@
<%= @info_request.public_body.name %> <%= _('have delayed.')%>
-<%=_ ('They have not replied to your {{law_used_short}} request {{title}} promptly, as normally required by law',:law_used_short=>@info_request.law_used_short,:title=>@info_request.title)%><% if @info_request.public_body.is_school? %> <%=_ ('during term time')%> <% end %>.
+<%= _('They have not replied to your {{law_used_short}} request {{title}} promptly, as normally required by law',:law_used_short=>@info_request.law_used_short,:title=>@info_request.title)%><% if @info_request.public_body.is_school? %> <%=_('during term time')%> <% end %>.
<%= _('Click on the link below to send a message to {{public_body}} reminding them to reply to your request.',:public_body=>@info_request.public_body.name)%>