Sha256: 9a9a9b5221d779532b8d9c64e46b76a880a6a9a07683ad4c03310087b67c49af
Contents?: true
Size: 1.3 KB
Versions: 13
Compression:
Stored size: 1.3 KB
Contents
# frozen_string_literal: true module Decidim module Initiatives module Admin # Controller that allows managing initiatives types # permissions in the admin panel. class InitiativesTypesPermissionsController < Decidim::Admin::ResourcePermissionsController include Decidim::TranslatableAttributes before_action :set_controller_breadcrumb add_breadcrumb_item_from_menu :admin_initiatives_menu layout "decidim/admin/initiatives" register_permissions(::Decidim::Initiatives::Admin::InitiativesTypesPermissionsController, ::Decidim::Initiatives::Permissions, ::Decidim::Admin::Permissions) def permission_class_chain ::Decidim.permissions_registry.chain_for(::Decidim::Initiatives::Admin::InitiativesTypesPermissionsController) end private def set_controller_breadcrumb controller_breadcrumb_items.append( { label: translated_attribute(resource.title), url: edit_initiatives_type_path(resource), active: false }, { label: t("permissions", scope: "decidim.admin.actions"), active: true } ) end end end end end
Version data entries
13 entries across 13 versions & 1 rubygems