Class: Decidim::System::Menu

Inherits:
Object
  • Object
show all
Defined in:
lib/decidim/system/menu.rb

Class Method Summary collapse

Class Method Details

.register_system_menu!Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/decidim/system/menu.rb', line 6

def self.register_system_menu!
  Decidim.menu :system_menu do |menu|
    menu.add_item :root,
                  I18n.t("menu.dashboard", scope: "decidim.system"),
                  decidim_system.root_path,
                  position: 1,
                  active: ["decidim/system/dashboard" => :show]

    menu.add_item :organizations,
                  I18n.t("menu.organizations", scope: "decidim.system"),
                  decidim_system.organizations_path,
                  position: 2,
                  active: :inclusive

    menu.add_item :admins,
                  I18n.t("menu.admins", scope: "decidim.system"),
                  decidim_system.admins_path,
                  position: 3,
                  active: :inclusive

    menu.add_item :oauth_applications,
                  I18n.t("menu.oauth_applications", scope: "decidim.system"),
                  decidim_system.oauth_applications_path,
                  position: 4,
                  active: [%w(decidim/system/oauth_applications), []]
  end
end