Sha256: 8c00a8d60dc4559ddc66b04a5c448725969f5faf14900ffdcd5da88cc8e61b45

Contents?: true

Size: 755 Bytes

Versions: 6

Compression:

Stored size: 755 Bytes

Contents

ActiveAdmin::Views::Header.class_eval do
  def build(namespace, menu)
    super(id: 'header', 'data-env': Rails.env)

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

    build_site_header
  end

  def build_site_header
    div class: 'w-100' do
      div class: 'd-flex justify-content-between px-4 py-2' do
        div do
          site_title @namespace
        end

        insert_tag view_factory.global_navigation, @utility_menu, id: 'utility_nav', class: 'header-item tabs'
      end

      div class: 'border-bottom-white-50 mx-4' do
      end

      div class: 'px-4 py-2' do
        insert_tag view_factory.global_navigation, @menu, class: 'header-item tabs'
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
light_admin-1.1.4 lib/light_admin/header.rb
light_admin-1.1.3 lib/light_admin/header.rb
light_admin-1.1.2 lib/light_admin/header.rb
light_admin-1.1.1 lib/light_admin/header.rb
light_admin-1.0.9 lib/light_admin/header.rb
light_admin-1.0.8 lib/light_admin/header.rb