Sha256: 33e73edaf31e747bc8f9e8b39fb454c4644180796f1070146f48c3d1257a17e2

Contents?: true

Size: 1.68 KB

Versions: 1

Compression:

Stored size: 1.68 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
    
    nav << {
      'id' => 'saved-properties',
      'text' => 'Saved Properties', 
      'href' => '/saved-properties',
      'modal' => false
    }
    nav << {
      'id' => 'saved-searches',
      'text' => 'Saved Searches', 
      'href' => '/saved-searches',
      'modal' => true
    }    
    
    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 }    
    
    nav << item
    
    return nav
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
caboose-rets-0.1.2 app/models/caboose_rets/rets_plugin.rb