Class: Decidim::ParticipatoryProcesses::Admin::ParticipatoryProcessGroupLandingPageController
- Inherits:
-
ApplicationController
- Object
- Admin::ApplicationController
- ApplicationController
- Decidim::ParticipatoryProcesses::Admin::ParticipatoryProcessGroupLandingPageController
- Includes:
- Admin::LandingPage
- Defined in:
- app/controllers/decidim/participatory_processes/admin/participatory_process_group_landing_page_controller.rb
Overview
Controller that allows managing the participatory process group landing page
Instance Method Summary collapse
- #active_content_blocks_title ⇒ Object
- #content_block_scope ⇒ Object
- #enforce_permission_to_update_resource ⇒ Object
- #inactive_content_blocks_title ⇒ Object
- #resource_content_block_cell ⇒ Object
- #resource_sort_url ⇒ Object
- #scoped_resource ⇒ Object (also: #participatory_process_group)
Instance Method Details
#active_content_blocks_title ⇒ Object
31 32 33 |
# File 'app/controllers/decidim/participatory_processes/admin/participatory_process_group_landing_page_controller.rb', line 31 def active_content_blocks_title t("participatory_process_group_landing_page.edit.active_content_blocks", scope: "decidim.admin") end |
#content_block_scope ⇒ Object
15 16 17 |
# File 'app/controllers/decidim/participatory_processes/admin/participatory_process_group_landing_page_controller.rb', line 15 def content_block_scope :participatory_process_group_homepage end |
#enforce_permission_to_update_resource ⇒ Object
23 24 25 |
# File 'app/controllers/decidim/participatory_processes/admin/participatory_process_group_landing_page_controller.rb', line 23 def :update, :process_group, process_group: scoped_resource end |
#inactive_content_blocks_title ⇒ Object
35 36 37 |
# File 'app/controllers/decidim/participatory_processes/admin/participatory_process_group_landing_page_controller.rb', line 35 def inactive_content_blocks_title t("participatory_process_group_landing_page.edit.inactive_content_blocks", scope: "decidim.admin") end |
#resource_content_block_cell ⇒ Object
39 40 41 |
# File 'app/controllers/decidim/participatory_processes/admin/participatory_process_group_landing_page_controller.rb', line 39 def resource_content_block_cell "decidim/participatory_process_groups/content_block" end |
#resource_sort_url ⇒ Object
27 28 29 |
# File 'app/controllers/decidim/participatory_processes/admin/participatory_process_group_landing_page_controller.rb', line 27 def resource_sort_url participatory_process_group_landing_page_path(scoped_resource) end |
#scoped_resource ⇒ Object Also known as: participatory_process_group
19 20 21 |
# File 'app/controllers/decidim/participatory_processes/admin/participatory_process_group_landing_page_controller.rb', line 19 def scoped_resource @scoped_resource ||= collection.find(params[:participatory_process_group_id]) end |