Sha256: a55007b6a9bc4e28e35ff5512844547818fe21129e8f19d263afd88e96fc0169

Contents?: true

Size: 632 Bytes

Versions: 4

Compression:

Stored size: 632 Bytes

Contents

module ActiveAdmin
  module Views
    class Header < Component

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

        @namespace = namespace
        @menu = menu

        build_site_title
        build_global_navigation
        build_utility_navigation
      end


      def build_site_title
        insert_tag view_factory.site_title, @namespace
      end

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

      def build_utility_navigation
        insert_tag view_factory.utility_navigation, @namespace
      end

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
activeadmin-0.5.1 lib/active_admin/views/header.rb
activeadmin-0.5.0 lib/active_admin/views/header.rb
activeadmin-0.5.0.pre1 lib/active_admin/views/header.rb
activeadmin-0.5.0.pre lib/active_admin/views/header.rb