Sha256: 8293c5d943203091569bb9446ab3d6f73c9e107c52ad7045b3c17d360da8aab6
Contents?: true
Size: 1.24 KB
Versions: 33
Compression:
Stored size: 1.24 KB
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' => 'vendors' , 'href' => '/admin/vendors' , 'text' => 'Vendors' , 'modal' => false } if user.is_allowed('vendors' , '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 def self.javascripts(scripts) scripts << 'caboose_store/application' return scripts end #def self.login_success # @order.update_attribute(:customer_id, session['app_user'].id) #end end end
Version data entries
33 entries across 33 versions & 1 rubygems