Sha256: 1f793c9097ed251dfffb8b5696c832659b21df27a171dd7fe9e07391dbc2d318

Contents?: true

Size: 500 Bytes

Versions: 42

Compression:

Stored size: 500 Bytes

Contents

module Sunrise
  module Config
    class NavigationItem
      attr_accessor :name, :url
      
      def initialize(name, url, scope = "items", options = {})
        @name = name
        @scope = scope
        @url = url
        @title = options.delete(:title)
        @options = options
      end
      
      def title
        @title ||= I18n.t(@name, :scope => [:manage, :menu, @scope])
      end
      
      def html_options
        @options.nil? ? {} : @options.dup
      end
    end
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
sunrise-cms-1.0.6 lib/sunrise/config/navigation_item.rb
sunrise-cms-1.0.5 lib/sunrise/config/navigation_item.rb
sunrise-cms-1.0.4 lib/sunrise/config/navigation_item.rb
sunrise-cms-1.0.3 lib/sunrise/config/navigation_item.rb
sunrise-cms-1.0.2 lib/sunrise/config/navigation_item.rb
sunrise-cms-1.0.1 lib/sunrise/config/navigation_item.rb
sunrise-cms-1.0.0 lib/sunrise/config/navigation_item.rb
sunrise-cms-1.0.0.rc3 lib/sunrise/config/navigation_item.rb
sunrise-cms-1.0.0.rc2 lib/sunrise/config/navigation_item.rb
sunrise-cms-1.0.0.rc1 lib/sunrise/config/navigation_item.rb
sunrise-cms-0.7.0.rc2 lib/sunrise/config/navigation_item.rb
sunrise-cms-0.7.0.rc1 lib/sunrise/config/navigation_item.rb
sunrise-cms-0.6.11 lib/sunrise/config/navigation_item.rb
sunrise-cms-0.6.10 lib/sunrise/config/navigation_item.rb
sunrise-cms-0.6.9 lib/sunrise/config/navigation_item.rb
sunrise-cms-0.6.8 lib/sunrise/config/navigation_item.rb
sunrise-cms-0.6.7 lib/sunrise/config/navigation_item.rb
sunrise-cms-0.6.6 lib/sunrise/config/navigation_item.rb
sunrise-cms-0.6.5 lib/sunrise/config/navigation_item.rb
sunrise-cms-0.6.4 lib/sunrise/config/navigation_item.rb