aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/admin_user_controller.rb
diff options
context:
space:
mode:
authorAndrew Black <andrewdblack@googlemail.com>2014-01-17 15:21:21 +0000
committerGareth Rees <gareth@mysociety.org>2014-03-25 09:58:00 +0000
commit8d95de46477ac164c99ca33eafd10115ba51db2a (patch)
tree07dbb4697912602f357744443d13d4104dbf07d1 /app/controllers/admin_user_controller.rb
parent2f5085e25a9fd66d839463835a63767003708f62 (diff)
Controller code to hide/unhide annotations
The UI provides a list of comment_ids and a newstate="visible" or "hide"
Diffstat (limited to 'app/controllers/admin_user_controller.rb')
-rw-r--r--app/controllers/admin_user_controller.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/controllers/admin_user_controller.rb b/app/controllers/admin_user_controller.rb
index 940a5fe8f..a6438e151 100644
--- a/app/controllers/admin_user_controller.rb
+++ b/app/controllers/admin_user_controller.rb
@@ -99,6 +99,12 @@ class AdminUserController < AdminController
redirect_to admin_user_show_url(@admin_user)
end
+ def modify_comment_visibility
+ @visibility_value = params.key?(:hide_selected) ? false : true
+ Comment.update_all(["visible=?", @visibility_value], :id => params[:comment_ids])
+ redirect_to :back
+ end
+
private
end