Sha256: b47bcbcda5b94b01d821b7dc562defee91f845c1b660fcf51274b1af8bb908f2
Contents?: true
Size: 871 Bytes
Versions: 9
Compression:
Stored size: 871 Bytes
Contents
module CabooseStore class CabooseStorePlugin < Caboose::CaboosePlugin def self.admin_nav(nav, user = nil, page = nil) return nav if user.nil? item = { 'id' => 'general-store', 'text' => 'General Store', 'children' => [] } item['children'] << { 'id' => 'categories', 'href' => '/admin/categories' , 'text' => 'Categories' , 'modal' => false } if user.is_allowed('categories' , 'view') item['children'] << { 'id' => 'products' , 'href' => '/admin/products' , 'text' => 'Products' , 'modal' => false } if user.is_allowed('products' , 'view') item['children'] << { 'id' => 'orders' , 'href' => '/admin/orders' , 'text' => 'Orders' , 'modal' => false } if user.is_allowed('orders' , 'view') nav << item return nav end end end
Version data entries
9 entries across 9 versions & 1 rubygems