Sha256: 089851ee73bbbcf358b1b3a811f26bc410daf310bff08555d787f5b6d739d5d2
Contents?: true
Size: 643 Bytes
Versions: 35
Compression:
Stored size: 643 Bytes
Contents
class Caboose::PostPlugin < Caboose::CaboosePlugin def self.admin_nav(nav, user, page) return nav if user.nil? || !user.is_allowed('pages', 'view') item = { 'id' => 'posts', 'text' => 'Posts', 'children' => [] #'show_children_default' => true } item['children'] << { 'href' => "/admin/posts", 'text' => 'New Post', 'modal' => true } if (user.is_allowed('posts', 'add')) item['children'] << { 'href' => "/admin/posts/new", 'text' => 'New Post', 'modal' => true } end nav << item return nav end end
Version data entries
35 entries across 35 versions & 1 rubygems