Sha256: 05123028f2f75b8216e1186d54a9beebc948dddd14d54f4e4132ca40b1b50ec7

Contents?: true

Size: 758 Bytes

Versions: 12

Compression:

Stored size: 758 Bytes

Contents

module ActiveAdmin
  module Views
    class Header < Component

      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


      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 tabs'
      end

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

    end
  end
end

Version data entries

12 entries across 12 versions & 3 rubygems

Version Path
activeadmin-0.6.6 lib/active_admin/views/header.rb
activeadmin-0.6.5 lib/active_admin/views/header.rb
activeadmin-0.6.4 lib/active_admin/views/header.rb
yousty-activeadmin-1.0.4.pre lib/active_admin/views/header.rb
yousty-activeadmin-1.0.3.pre lib/active_admin/views/header.rb
yousty-activeadmin-1.0.2.pre lib/active_admin/views/header.rb
activeadmin-0.6.3 lib/active_admin/views/header.rb
yousty-activeadmin-1.0.1.pre lib/active_admin/views/header.rb
yousty-activeadmin-1.0.0.pre lib/active_admin/views/header.rb
activeadmin-0.6.2 lib/active_admin/views/header.rb
activeadmin-0.6.1 lib/active_admin/views/header.rb
aa-rails4-0.6.0 lib/active_admin/views/header.rb