Class: Decidim::Elections::Admin::FeedbackFormsController

Inherits:
ApplicationController show all
Includes:
Forms::Admin::Concerns::HasQuestionnaire, Forms::Admin::Concerns::HasQuestionnaireAnswers
Defined in:
decidim-elections/app/controllers/decidim/elections/admin/feedback_forms_controller.rb

Overview

This controller allows an admin to manage the form to be filled when a user finishes voting

Instance Method Summary collapse

Methods inherited from Admin::Components::BaseController

#current_component, #current_participatory_space, #parent_path, #permission_class_chain, #permission_scope, #permissions_context, #skip_manage_component_permission

Methods included from RegistersPermissions

register_permissions

Methods inherited from Admin::ApplicationController

#permission_class_chain, #permission_scope, #user_has_no_permission_path, #user_not_authorized_path

Methods included from HttpCachingDisabler

#disable_http_caching

Methods included from NeedsSnippets

#snippets

Methods included from NeedsOrganization

enhance_controller, extended, included

Instance Method Details

#after_update_urlObject


19
20
21
# File 'decidim-elections/app/controllers/decidim/elections/admin/feedback_forms_controller.rb', line 19

def after_update_url
  edit_feedback_form_path(id: election.id)
end

#answer_options_url(params) ⇒ Object


27
28
29
# File 'decidim-elections/app/controllers/decidim/elections/admin/feedback_forms_controller.rb', line 27

def answer_options_url(params)
  answer_options_election_feedback_path(**params)
end

#public_urlObject


23
24
25
# File 'decidim-elections/app/controllers/decidim/elections/admin/feedback_forms_controller.rb', line 23

def public_url
  Decidim::EngineRouter.main_proxy(current_component).election_feedback_path(election)
end

#questionnaire_export_response_url(session_token) ⇒ Object


39
40
41
# File 'decidim-elections/app/controllers/decidim/elections/admin/feedback_forms_controller.rb', line 39

def questionnaire_export_response_url(session_token)
  answer_export_feedback_form_path(id: election.id, session_token: session_token, format: "pdf")
end

#questionnaire_forObject


11
12
13
# File 'decidim-elections/app/controllers/decidim/elections/admin/feedback_forms_controller.rb', line 11

def questionnaire_for
  election
end

#questionnaire_participant_answers_url(session_token) ⇒ Object


35
36
37
# File 'decidim-elections/app/controllers/decidim/elections/admin/feedback_forms_controller.rb', line 35

def questionnaire_participant_answers_url(session_token)
  answer_feedback_form_path(id: election.id, session_token: session_token)
end

#questionnaire_participants_urlObject


31
32
33
# File 'decidim-elections/app/controllers/decidim/elections/admin/feedback_forms_controller.rb', line 31

def questionnaire_participants_url
  answers_feedback_form_path(id: election.id)
end

#questionnaire_urlObject


43
44
45
# File 'decidim-elections/app/controllers/decidim/elections/admin/feedback_forms_controller.rb', line 43

def questionnaire_url
  edit_feedback_form_path(id: election.id)
end

#update_urlObject


15
16
17
# File 'decidim-elections/app/controllers/decidim/elections/admin/feedback_forms_controller.rb', line 15

def update_url
  feedback_form_path(election_id: election.id)
end