Class: Decidim::ParticipatoryProcesses::Admin::ParticipatoryProcessGroupLandingPageController

Inherits:
ApplicationController show all
Includes:
Admin::LandingPage
Defined in:
decidim-participatory_processes/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

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 RegistersPermissions

register_permissions

Methods included from NeedsOrganization

enhance_controller, extended, included

Instance Method Details

#active_content_blocks_titleObject


31
32
33
# File 'decidim-participatory_processes/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_scopeObject


15
16
17
# File 'decidim-participatory_processes/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_resourceObject


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

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

#inactive_content_blocks_titleObject


35
36
37
# File 'decidim-participatory_processes/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_cellObject


39
40
41
# File 'decidim-participatory_processes/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_urlObject


27
28
29
# File 'decidim-participatory_processes/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_resourceObject Also known as: participatory_process_group


19
20
21
# File 'decidim-participatory_processes/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