Class: Decidim::ParticipatoryProcesses::Admin::ParticipatoryProcessLandingPageController

Inherits:
ApplicationController show all
Includes:
Admin::ContentBlocks::LandingPage, Concerns::ParticipatoryProcessAdmin
Defined in:
decidim-participatory_processes/app/controllers/decidim/participatory_processes/admin/participatory_process_landing_page_controller.rb

Overview

Controller that allows managing the participatory process landing page

Instance Method Summary collapse

Methods inherited from Admin::ApplicationController

#permission_class_chain, #permission_scope, #user_has_no_permission_path, #user_not_authorized_path

Methods included from Headers::HttpCachingDisabler

#disable_http_caching

Methods included from NeedsSnippets

#snippets

Methods included from RegistersPermissions

register_permissions

Methods included from NeedsOrganization

enhance_controller, extended, included

Instance Method Details

#content_block_scopeObject



13
14
15
# File 'decidim-participatory_processes/app/controllers/decidim/participatory_processes/admin/participatory_process_landing_page_controller.rb', line 13

def content_block_scope
  current_participatory_space_manifest.content_blocks_scope_name
end

#enforce_permission_to_update_resourceObject



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

def enforce_permission_to_update_resource
  enforce_permission_to :update, :process, process: scoped_resource
end

#resource_content_block_cellObject



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

def resource_content_block_cell
  "decidim/participatory_processes/content_block"
end

#resource_create_url(manifest_name) ⇒ Object



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

def resource_create_url(manifest_name)
  participatory_process_landing_page_content_blocks_path(slug: params[:slug], manifest_name:)
end

#resource_sort_urlObject



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

def resource_sort_url
  participatory_process_landing_page_path(scoped_resource)
end