Sha256: 4ca435badc568637e7ea335bd2c5f1907c40185569f0f983bb9f0b2e485cef87

Contents?: true

Size: 1.83 KB

Versions: 6

Compression:

Stored size: 1.83 KB

Contents

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

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

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

  # # Default Application Site URL
  # mattr_accessor :application_site_url
  # @@application_site_url = 'http://localhost'

  # 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', display: 'not_signed_in', path: 'new_user_session_path', position: 'right', condition: 'true',
      links: [{ name: 'Sign Up', path: 'new_user_registration_path' }]
    },
    {
      name: 'current_user.name', eval: true, display: 'signed_in', path: 'user_path(current_user)', position: 'right', condition: 'true',
      links: [{ html: '"<div class=\"small\" style=\"color:#bbb\">"+current_user.email+"</div>"', eval: true },
              { name: 'Authentications', path: 'authentications_path', condition: 'not PROVIDERS.blank?' },
              { html: "<br />" },
              { name: 'Logout', path: 'destroy_user_session_path' }]
    },
    {
      name: 'Home', display: 'always', path: 'root_path', position: 'left', condition: 'true', image: '', image_options: {},
      links: []
    }
  ]
   
  # Default news feed
  mattr_accessor :news_feed
  @@news_feed = nil
  
  # Default max number of items displayed in the news feed
  mattr_accessor :news_feed_items
  @@news_feed_items = 5
  
  def self.setup
    yield self
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
contour-0.8.3 lib/contour.rb
contour-0.8.2 lib/contour.rb
contour-0.8.1 lib/contour.rb
contour-0.8.0 lib/contour.rb
contour-0.7.2 lib/contour.rb
contour-0.7.1 lib/contour.rb