Class: ActiveAdmin::Views::Header

Inherits:
Component
  • Object
show all
Defined in:
lib/active_admin/views/header.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) build(namespace, menu)



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/active_admin/views/header.rb', line 5

def build(namespace, menu)
  super(id: "header")

  @namespace = namespace
  @menu = menu
  @utility_menu = @namespace.fetch_menu(:utility_navigation)

  build_site_title
  build_global_navigation
  build_utility_navigation
end

- (Object) build_global_navigation



22
23
24
# File 'lib/active_admin/views/header.rb', line 22

def build_global_navigation
  insert_tag view_factory.global_navigation, @menu, class: 'header-item tabs'
end

- (Object) build_site_title



18
19
20
# File 'lib/active_admin/views/header.rb', line 18

def build_site_title
  insert_tag view_factory.site_title, @namespace
end

- (Object) build_utility_navigation



26
27
28
# File 'lib/active_admin/views/header.rb', line 26

def build_utility_navigation
  insert_tag view_factory.utility_navigation, @utility_menu, id: "utility_nav", class: 'header-item tabs'
end