Sha256: 7791cf833c540eb8a83f1d87c27b3a1bc90010536b00e28453cf50f9bf2179ee

Contents?: true

Size: 1.6 KB

Versions: 5

Compression:

Stored size: 1.6 KB

Contents

require 'contour/engine' if defined?(Rails)
require 'contour/version'

module Contour
  # Default Application Name
  mattr_accessor :application_name
  @@application_name = nil

  # Default Application Version
  mattr_accessor :application_version
  @@application_version = nil

  # Default Application Version
  mattr_accessor :header_background_image
  @@header_background_image = 'rails.png'
  
  # Default Application Version
  mattr_accessor :header_title_image
  @@header_title_image = nil
  
  # Default Menu Items
  mattr_accessor :menu_items
  @@menu_items = [
    {
      :name => 'Login', :id => 'auth', :display => 'not_signed_in', :position => 'right', :position_class => 'right',
      :links => [{:name => 'Login', :path => 'new_user_session_path'}, {:html => "<hr>"}, {:name => 'Sign Up', :path => 'new_user_registration_path'}]
    },
    {
      :name => 'current_user.name', :eval => true, :id => 'auth', :display => 'signed_in', :position => 'right', :position_class => 'right',
      :links => [{:html => '"<div style=\"white-space:nowrap\">"+current_user.name+"</div>"', :eval => true}, {:html => '"<div class=\"small quiet\">"+current_user.email+"</div>"', :eval => true}, {:name => 'Authentications', :path => 'authentications_path'}, {:html => "<hr>"}, {:name => 'Logout', :path => 'destroy_user_session_path'}]
    },
    {
      :name => 'Home', :id => 'home', :display => 'always', :position => 'left', :position_class => 'left',
      :links => [{:name => 'Home', :path => 'root_path'}, {:html => "<hr>"}, {:name => 'About', :path => 'about_path'}]
    }
  ]
    
  def self.setup
    yield self
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
contour-0.3.2 lib/contour.rb
contour-0.3.1 lib/contour.rb
contour-0.3.0 lib/contour.rb
contour-0.2.1 lib/contour.rb
contour-0.1.1 lib/contour.rb