diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2012-05-25 14:24:16 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2012-05-25 14:24:16 +0100 |
commit | 084cc18aa872b3cd1cbc8c38d34dc17341472391 (patch) | |
tree | 6cbd9df8976a64c342cae8428f15b98a5cb5a70b /app/controllers/services_controller.rb | |
parent | af2d6d28571bb49d25b7982d1ba508b850a05b0f (diff) |
Support easy hiding of requests for admins. Currently not exposed in core admin interface (requires adminbootstraptheme).
Diffstat (limited to 'app/controllers/services_controller.rb')
-rw-r--r-- | app/controllers/services_controller.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/controllers/services_controller.rb b/app/controllers/services_controller.rb index 225790d71..28dd2143d 100644 --- a/app/controllers/services_controller.rb +++ b/app/controllers/services_controller.rb @@ -21,4 +21,15 @@ class ServicesController < ApplicationController end render :text => text, :content_type => "text/plain" # XXX workaround the HTML validation in test suite end + def hidden_user_explanation + info_request = InfoRequest.find(params[:info_request_id]) + render :template => "admin_request/hidden_user_explanation", + :content_type => "text/plain", + :layout => false, + :locals => {:name_to => info_request.user.name, + :name_from => MySociety::Config.get("CONTACT_NAME", 'Alaveteli'), + :info_request => info_request, :reason => params[:reason], + :info_request_url => 'http://' + MySociety::Config.get('DOMAIN') + request_url(info_request), + :site_name => site_name} + end end |