Sha256: 2346900cde183d8c84b4f8286f9eaf444a169417ddc0e458a58fd87112ddfcf3

Contents?: true

Size: 1.18 KB

Versions: 45

Compression:

Stored size: 1.18 KB

Contents

# frozen_string_literal: true

module Decidim
  module Templates
    module Admin
      # This controller is the abstract class from which all other controllers of
      # this engine inherit.
      #
      # Note that it inherits from `Decidim::Admin::ApplicationController`, which
      # override its layout and provide all kinds of useful methods.
      #
      # i18n-tasks-use t('decidim.admin.titles.template_types.questionnaires')
      class ApplicationController < Decidim::Admin::ApplicationController
        layout "decidim/admin/templates"

        helper_method :template_types

        register_permissions(::Decidim::Templates::Admin::ApplicationController,
                             ::Decidim::Templates::Admin::Permissions,
                             ::Decidim::Admin::Permissions)

        def permission_class_chain
          ::Decidim.permissions_registry.chain_for(::Decidim::Templates::Admin::ApplicationController)
        end

        def template_types
          @template_types ||= {
            I18n.t("template_types.questionnaires", scope: "decidim.templates") => decidim_admin_templates.questionnaire_templates_path
          }
        end
      end
    end
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
decidim-templates-0.27.9 app/controllers/decidim/templates/admin/application_controller.rb
decidim-templates-0.27.8 app/controllers/decidim/templates/admin/application_controller.rb
decidim-templates-0.27.7 app/controllers/decidim/templates/admin/application_controller.rb
decidim-templates-0.27.6 app/controllers/decidim/templates/admin/application_controller.rb
decidim-templates-0.26.10 app/controllers/decidim/templates/admin/application_controller.rb
decidim-templates-0.26.9 app/controllers/decidim/templates/admin/application_controller.rb
decidim-templates-0.27.5 app/controllers/decidim/templates/admin/application_controller.rb
decidim-templates-0.26.8 app/controllers/decidim/templates/admin/application_controller.rb
decidim-templates-0.27.4 app/controllers/decidim/templates/admin/application_controller.rb
decidim-templates-0.27.3 app/controllers/decidim/templates/admin/application_controller.rb
decidim-templates-0.26.7 app/controllers/decidim/templates/admin/application_controller.rb
decidim-templates-0.26.5 app/controllers/decidim/templates/admin/application_controller.rb
decidim-templates-0.27.2 app/controllers/decidim/templates/admin/application_controller.rb
decidim-templates-0.27.1 app/controllers/decidim/templates/admin/application_controller.rb
decidim-templates-0.26.4 app/controllers/decidim/templates/admin/application_controller.rb
decidim-templates-0.27.0 app/controllers/decidim/templates/admin/application_controller.rb
decidim-templates-0.26.3 app/controllers/decidim/templates/admin/application_controller.rb
decidim-templates-0.27.0.rc2 app/controllers/decidim/templates/admin/application_controller.rb
decidim-templates-0.27.0.rc1 app/controllers/decidim/templates/admin/application_controller.rb
decidim-templates-0.26.2 app/controllers/decidim/templates/admin/application_controller.rb