Sha256: 1126223dd4d7cc611f3ed08c6bc81348966ab95713d83eaf6a516bf273d8b4e8

Contents?: true

Size: 1.71 KB

Versions: 24

Compression:

Stored size: 1.71 KB

Contents

class CabooseRets::RetsPlugin < Caboose::CaboosePlugin

  def self.admin_nav(nav, user = nil, page = nil, site)  
    return nav if user.nil?
    return nav if !site.use_rets    
    return nav if !user.is_allowed('properties', 'view')
    
    item = {
      'id' => 'rets',
      'text' => 'RETS', 
      'children' => [],
      'modal' => true
    }    
    item['children'] << { 'id' => 'agents'           , 'href' => '/admin/agents'           , 'text' => 'Agents'                , 'modal' => false }
    item['children'] << { 'id' => 'offices'          , 'href' => '/admin/offices'          , 'text' => 'Offices'               , 'modal' => false }
    item['children'] << { 'id' => 'open-houses'      , 'href' => '/admin/open-houses'      , 'text' => 'Open Houses'           , 'modal' => false }
    item['children'] << { 'id' => 'residential'      , 'href' => '/admin/residential'      , 'text' => 'Residential Property'  , 'modal' => false }
    item['children'] << { 'id' => 'commercial'       , 'href' => '/admin/commercial'       , 'text' => 'Commercial Property'   , 'modal' => false }
    item['children'] << { 'id' => 'commercial'       , 'href' => '/admin/multi-family'     , 'text' => 'Multi-Family Property' , 'modal' => false }
    item['children'] << { 'id' => 'land'             , 'href' => '/admin/land'             , 'text' => 'Land Property'         , 'modal' => false }
    item['children'] << { 'id' => 'saved-properties' , 'href' => '/saved-properties'       , 'text' => 'Saved Properties'      , 'modal' => false }
    item['children'] << { 'id' => 'saved-searches'   , 'href' => '/saved-searches'         , 'text' => 'Saved Searches'        , 'modal' => false }    
    
    nav << item
    
    return nav
  end
  
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
caboose-rets-0.1.26 app/models/caboose_rets/rets_plugin.rb
caboose-rets-0.1.25 app/models/caboose_rets/rets_plugin.rb
caboose-rets-0.1.24 app/models/caboose_rets/rets_plugin.rb
caboose-rets-0.1.23 app/models/caboose_rets/rets_plugin.rb
caboose-rets-0.1.22 app/models/caboose_rets/rets_plugin.rb
caboose-rets-0.1.21 app/models/caboose_rets/rets_plugin.rb
caboose-rets-0.1.20 app/models/caboose_rets/rets_plugin.rb
caboose-rets-0.1.19 app/models/caboose_rets/rets_plugin.rb
caboose-rets-0.1.18 app/models/caboose_rets/rets_plugin.rb
caboose-rets-0.1.17 app/models/caboose_rets/rets_plugin.rb
caboose-rets-0.1.16 app/models/caboose_rets/rets_plugin.rb
caboose-rets-0.1.15 app/models/caboose_rets/rets_plugin.rb
caboose-rets-0.1.14 app/models/caboose_rets/rets_plugin.rb
caboose-rets-0.1.13 app/models/caboose_rets/rets_plugin.rb
caboose-rets-0.1.12 app/models/caboose_rets/rets_plugin.rb
caboose-rets-0.1.11 app/models/caboose_rets/rets_plugin.rb
caboose-rets-0.1.10 app/models/caboose_rets/rets_plugin.rb
caboose-rets-0.1.9 app/models/caboose_rets/rets_plugin.rb
caboose-rets-0.1.8 app/models/caboose_rets/rets_plugin.rb
caboose-rets-0.1.7 app/models/caboose_rets/rets_plugin.rb