Class: MuckEngine

Inherits:
Object
  • Object
show all
Defined in:
lib/muck_engine.rb,
lib/muck_engine/tasks.rb

Defined Under Namespace

Classes: Tasks

Class Method Summary collapse

Class Method Details

.add_muck_admin_css(css_file) ⇒ Object

Add css for the admin UI



59
60
61
62
# File 'lib/muck_engine.rb', line 59

def self.add_muck_admin_css(css_file)
  @@muck_admin_css ||= []
  @@muck_admin_css << css_file
end

.add_muck_admin_nav_item(name, path, image = '') ⇒ Object

Add an item to the main admin navigation menu Paramters: name: Name for the link path: Url to link to image: Image for the link



32
33
34
35
36
37
# File 'lib/muck_engine.rb', line 32

def self.add_muck_admin_nav_item(name, path, image = '')
  @@muck_admin_nav_items ||= []
  @@muck_admin_nav_items << OpenStruct.new(:name => name,
                                           :path => path,
                                           :image => image)
end

.add_muck_dashboard_item(path, locals = {}) ⇒ Object

Add an item to the admin dashboard path: Path to the partial locals: Hash of values to pass as locals to the partial



47
48
49
50
51
# File 'lib/muck_engine.rb', line 47

def self.add_muck_dashboard_item(path, locals = {})
  @@muck_dashboard_items ||= []
  @@muck_dashboard_items << OpenStruct.new(:path => path,
                                           :locals => locals)
end

.muck_admin_cssObject



54
55
56
# File 'lib/muck_engine.rb', line 54

def self.muck_admin_css
  @@muck_admin_css || []
end

.muck_admin_nav_itemsObject



23
24
25
# File 'lib/muck_engine.rb', line 23

def self.muck_admin_nav_items
  @@muck_admin_nav_items || []
end

.muck_dashboard_itemsObject



40
41
42
# File 'lib/muck_engine.rb', line 40

def self.muck_dashboard_items
  @@muck_dashboard_items || []
end