Sha256: 39d6f92cea4bf97ab6a0e1222351ccb2913b276e9f3d0cfa7b059825ac6c84b1
Contents?: true
Size: 1.41 KB
Versions: 13
Compression:
Stored size: 1.41 KB
Contents
# frozen_string_literal: true module Decidim module ParticipatoryProcesses module Admin # Controller that allows to manage the content from the participatory process landing page content blocks class ParticipatoryProcessGroupLandingPageContentBlocksController < Decidim::ParticipatoryProcesses::Admin::ApplicationController include Decidim::Admin::ContentBlocks::LandingPageContentBlocks layout "decidim/admin/participatory_process_group" helper_method :participatory_process_group private def content_block_scope :participatory_process_group_homepage end def scoped_resource @scoped_resource ||= collection.find(params[:participatory_process_group_id]) end def enforce_permission_to_update_resource enforce_permission_to :update, :process_group, process_group: scoped_resource end def edit_resource_landing_page_path edit_participatory_process_group_landing_page_path(scoped_resource) end def resource_landing_page_content_block_path participatory_process_group_landing_page_content_block_path(scoped_resource, params[:id]) end alias participatory_process_group scoped_resource def collection @collection ||= OrganizationParticipatoryProcessGroups.new(current_user.organization).query end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems