Sha256: fe2e397f3cf0a2bc8fbc5fa64d6cc5a7cfdca8f6303c95fa01ed2bf060fed99a
Contents?: true
Size: 1.02 KB
Versions: 10
Compression:
Stored size: 1.02 KB
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}_#{I18n.locale}").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}_#{I18n.locale}").url_for(controller: "/#{kontroller.controller_path}"), title: resource_klass.model_name.human(count: :other), item_count: resource_count)
Version data entries
10 entries across 10 versions & 1 rubygems