Sha256: 63ff94369674ad5e9da9509e834f5808ca933279ec1c25cca0945ec9368ee08f
Contents?: true
Size: 1001 Bytes
Versions: 4
Compression:
Stored size: 1001 Bytes
Contents
- Itsf::Backend::Configuration.backend_engines.each do |engine| - if !respond_to?(:engine_policy) || engine_policy(engine).access? = accordion_menu(identifier: engine.name.parameterize, title: t("classes.#{engine.name.underscore}"), icon: 'menu-down') do |menu| = menu.item(icon: 'home', target: send(engine.engine_name).root_path, title: t(".home")) - controllers = engine.to_s.gsub('::Engine', '::Configuration').constantize.registered_controllers.call - controllers.each do |kontroller| - resource_klass = kontroller.resource_class - if !Itsf::Backend.features?(:pundit) || policy(resource_klass).index? - resource_count = kontroller.resource_count.respond_to?(:call) ? instance_exec(&kontroller.resource_count) : kontroller.resource_count = menu.item(icon: 'list', target: send(engine.engine_name).url_for(controller: "/#{kontroller.controller_path}"), title: resource_klass.model_name.human(count: :other), item_count: resource_count)
Version data entries
4 entries across 4 versions & 1 rubygems