Sha256: 27e4dbea61783397e0ad41fec7d261cefcbb2c675d22e1b59933a26109a3d8d7

Contents?: true

Size: 857 Bytes

Versions: 16

Compression:

Stored size: 857 Bytes

Contents

module Admix
  class Engine < ::Rails::Engine

    initializer "admix.setup_menu" do
      
      ActiveMenu::create('admix-nav') do |nav|        
        
        nav.child :dashboard do |dashboard|
          dashboard.text Proc.new { t('dashboard.dashboard') }
          dashboard.href Proc.new { admix_root_url }
          dashboard.option :icon, 'icon-flag'
        end

        nav.child :general do |general|
          general.text Proc.new { t('general.general') }
          general.option :icon, 'icon-flag'
          general.href 'javascript:;'
          general.visible Proc.new {current_user.has_role?(:admin)}
        end

        nav.child :content do |content|
          content.text Proc.new { t('content.content') }
          content.href 'javascript:;'
          content.option :icon, 'icon-flag'
        end

      end

    end

  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
mix-rails-0.26.3 admix/lib/admix/engine.rb
admix-0.26.3 lib/admix/engine.rb
mix-rails-0.26.2 admix/lib/admix/engine.rb
admix-0.26.2 lib/admix/engine.rb
mix-rails-0.26.1 admix/lib/admix/engine.rb
admix-0.26.1 lib/admix/engine.rb
mix-rails-0.26.0 admix/lib/admix/engine.rb
admix-0.26.0 lib/admix/engine.rb
mix-rails-0.25.1 admix/lib/admix/engine.rb
admix-0.25.1 lib/admix/engine.rb
mix-rails-0.25.0 admix/lib/admix/engine.rb
admix-0.25.0 lib/admix/engine.rb
mix-rails-0.24.1 admix/lib/admix/engine.rb
admix-0.24.1 lib/admix/engine.rb
mix-rails-0.24.0 admix/lib/admix/engine.rb
admix-0.24.0 lib/admix/engine.rb