Gallery - categories, module_authorization and tags to new_ui

This commit is contained in:
saurabhbhatia 2013-07-11 18:48:51 +08:00
parent c7cf7e1ce4
commit 06ab24374b
3 changed files with 25 additions and 14 deletions

View File

@ -2,6 +2,7 @@ class GalleryAlbum
include Mongoid::Document include Mongoid::Document
include Mongoid::Timestamps include Mongoid::Timestamps
include OrbitCategory::Categorizable
include OrbitTag::Taggable include OrbitTag::Taggable
field :name, localize: true field :name, localize: true

View File

@ -3,6 +3,8 @@ en:
gallery: gallery:
add_album: Add Album add_album: Add Album
add_images: Add Images add_images: Add Images
all: All
new: New
album: Album album: Album
album_desc: Album Description album_desc: Album Description
album_name: Album Name album_name: Album Name
@ -20,7 +22,7 @@ en:
frontend: frontend:
albums: Front-end albums albums: Front-end albums
gallery: Gallery gallery: Gallery
manage_categories: Manage Category categories: Category
new_category: New Category new_category: New Category
no_description: No Decription no_description: No Decription
photo_tag: Photo Tag photo_tag: Photo Tag

View File

@ -16,8 +16,8 @@ module Gallery
end end
end end
category ["gallery_categories"] authorizable
categorizable
taggable taggable
widgets do widgets do
@ -49,24 +49,32 @@ module Gallery
active_for_object_auth ['GalleryCategory'] active_for_object_auth ['GalleryCategory']
head_link_path "panel_gallery_back_end_albums_path" head_link_path "panel_gallery_back_end_albums_path"
context_link 'categories', context_link 'gallery.all',
:link_path=>"panel_gallery_back_end_gallery_categories_path" , :link_path=>"panel_gallery_back_end_albums_path" ,
:priority=>3, :priority=>3,
:active_for_action=>{:gallery_categories=>:index}, :active_for_category => 'Gallery',
:active_for_action=>{:albums=>:index},
:available_for => [:manager]
context_link 'gallery.new',
:link_path=>"new_panel_gallery_back_end_album_path" ,
:priority=>3,
:active_for_category => 'Gallery',
:active_for_action=>{:albums=>:new},
:available_for => [:manager]
context_link 'gallery.categories',
:link_path=>"admin_module_app_categories_path(get_module_app)" ,
:priority=>3,
:active_for_category => 'Gallery',
:available_for => [:manager] :available_for => [:manager]
context_link 'tags', context_link 'tags',
:link_path=>"admin_module_tags_path(:module_app_id => ModuleApp.first(conditions: {title: 'Gallery'}))" , :link_path=>"admin_module_tags_path(module_app_id: get_module_app)" ,
:priority=>4, :priority=>4,
:active_for_tag => 'Gallery', :active_for_tag => 'Gallery',
:available_for => [:manager] :available_for => [:manager]
context_link 'module_authorization',
:link_path=>"admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: 'Gallery'}))",
:priority=>6,
:active_for_app_auth => 'gallery',
:available_for => [:admin]
end end
end end
end end