lib/decidim/templates/admin_engine.rb in decidim-templates-0.26.10 vs lib/decidim/templates/admin_engine.rb in decidim-templates-0.27.0.rc1

- old
+ new

@@ -38,18 +38,23 @@ active: is_active_link?(url) end end end - initializer "decidim_templates_admin.menu" do + initializer "decidim_templates.admin_mount_routes" do + Decidim::Core::Engine.routes do + mount Decidim::Templates::AdminEngine, at: "/admin/templates", as: "decidim_admin_templates" + end + end + + initializer "decidim_templates.admin_menu" do Decidim.menu :admin_menu do |menu| menu.add_item :questionnaire_templates, I18n.t("menu.templates", scope: "decidim.admin", default: "Templates"), decidim_admin_templates.questionnaire_templates_path, icon_name: "document", position: 12, - active: :inclusive, - if: allowed_to?(:read, :templates) + active: :inclusive end end def load_seed nil