Sha256: 326d8262c17545bbf1ce158fbcf6a6fa33d2e1af378500e88b6f0aa4612af5a3
Contents?: true
Size: 1.39 KB
Versions: 7
Compression:
Stored size: 1.39 KB
Contents
# frozen_string_literal: true require "active_support/concern" module Decidim module Conferences module Admin module Concerns # This concern is meant to be included in all controllers that are scoped # into an conference's admin panel. It will override the layout so it shows # the sidebar, preload the conference, etc. module ConferenceAdmin extend ActiveSupport::Concern included do include Decidim::Admin::ParticipatorySpaceAdminContext participatory_space_admin_layout helper_method :current_conference def current_conference @current_conference ||= organization_conferences.find_by!( slug: params[:conference_slug] || params[:slug] ) end alias_method :current_participatory_space, :current_conference def organization_conferences @organization_conferences ||= OrganizationConferences.new(current_organization).query end def permissions_context super.merge(current_participatory_space: current_participatory_space) end def permission_class_chain [ Decidim::Conferences::Permissions, Decidim::Admin::Permissions ] end end end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems