diff options
-rwxr-xr-x | app/helpers/link_to_helper.rb | 2 | ||||
-rw-r--r-- | app/models/incoming_message.rb | 4 | ||||
-rw-r--r-- | app/views/request/show.rhtml | 17 | ||||
-rw-r--r-- | app/views/request_mailer/old_unclassified_updated.rhtml | 2 | ||||
-rw-r--r-- | app/views/request_mailer/overdue_alert.rhtml | 2 | ||||
-rw-r--r-- | config/general.yml-example | 7 | ||||
-rw-r--r-- | public/down.default.html | 12 |
7 files changed, 28 insertions, 18 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)%> diff --git a/config/general.yml-example b/config/general.yml-example index cb10ea40e..8a4a0442e 100644 --- a/config/general.yml-example +++ b/config/general.yml-example @@ -56,8 +56,11 @@ ADMIN_PASSWORD: 'passwordx' CONTACT_EMAIL: 'postmaster@localhost' CONTACT_NAME: 'Alaveteli Webmaster' -# The base URL for admin pages. You probably don't want to change this. -ADMIN_BASE_URL: '/admin/' +# The base URL for admin pages. +# If not specified, it will default to the path to the admin controller, +# which is usually what you want. It is useful in situations where admin +# requests are proxied via a secure server, for example. +# ADMIN_BASE_URL: '/admin/' # Where /stylesheets sits under for admin pages. See asset_host in # config/environment.rb. Can be full domain or relative path (not an diff --git a/public/down.default.html b/public/down.default.html index a5a577b81..c01e8fa19 100644 --- a/public/down.default.html +++ b/public/down.default.html @@ -23,12 +23,12 @@ Make and explore Freedom of Information requests </div> </div> - <div id="mysoclogo"> - <a href="http://www.mysociety.org">a site by mysociety.org</a> - </div> - <div id="topnav"> - <ul id="navigation"></ul> - </div> + <div id="mysoclogo"> + <a href="http://www.mysociety.org">a site by mysociety.org</a> + </div> + <div id="topnav"> + <ul id="navigation"></ul> + </div> <div id="wrapper"> <div id="content"> |