aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/admin_info_request_event_controller.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2015-03-30 16:00:02 +0100
committerLouise Crow <louise.crow@gmail.com>2015-03-30 16:00:02 +0100
commitf24cc98afa25ad6010ae5316eecc15dfdb3fa79b (patch)
treec32fecb16bb2097da7dfdf90e6915fce0bf1a425 /app/controllers/admin_info_request_event_controller.rb
parent823e58dc69960c600230b10604a0051359173f85 (diff)
parent3c0604cf900ad274d8f6ff421d39854ccbf4b6af (diff)
Merge branch 'release/0.21'0.21.0.0
Conflicts: locale/cy/app.po locale/es_NI/app.po locale/hr/app.po locale/is_IS/app.po locale/sr@latin/app.po
Diffstat (limited to 'app/controllers/admin_info_request_event_controller.rb')
-rw-r--r--app/controllers/admin_info_request_event_controller.rb24
1 files changed, 24 insertions, 0 deletions
diff --git a/app/controllers/admin_info_request_event_controller.rb b/app/controllers/admin_info_request_event_controller.rb
new file mode 100644
index 000000000..17d147582
--- /dev/null
+++ b/app/controllers/admin_info_request_event_controller.rb
@@ -0,0 +1,24 @@
+# app/controllers/admin_info_request_event_controller.rb:
+# Controller for FOI request event manipulation from the admin interface.
+#
+# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
+# Email: hello@mysociety.org; WWW: http://www.mysociety.org/
+
+class AdminInfoRequestEventController < AdminController
+
+ # used so due dates get fixed
+ def update
+ @info_request_event = InfoRequestEvent.find(params[:id])
+ if @info_request_event.event_type != 'response'
+ raise Exception("can only mark responses as requires clarification")
+ end
+ @info_request_event.described_state = 'waiting_clarification'
+ @info_request_event.calculated_state = 'waiting_clarification'
+ # TODO: deliberately don't update described_at so doesn't reenter search?
+ @info_request_event.save!
+
+ flash[:notice] = "Old response marked as having been a clarification"
+ redirect_to admin_request_url(@info_request_event.info_request)
+ end
+
+end