first version of confined sidebar render
This commit is contained in:
1 parent
b4a2737407
commit
c6894be962
18 files changed
+353
-158
No files matched your search
+6
-1
@@ -1,7 +1,12 @@
|
||||
class Panel::Announcement::BackEnd::BulletinCategorysController < OrbitBackendController
|
||||
include OrbitControllerLib::DivisionForDisable
|
||||
before_filter :for_app_manager,:except => [:index]
|
||||
|
||||
before_filter :set_module_app
|
||||
|
||||
def set_module_app
|
||||
@module_app = ModuleApp.where(:title=>'Announcement').first
|
||||
end
|
||||
|
||||
def index
|
||||
@bulletin_categorys = get_categories_for_index("BulletinCategory")
|
||||
#TODO 需要做 manager ,admin 才可以 all. 其他 available就好
|
||||
|
||||
+44
-18
@@ -2,24 +2,50 @@ module Announcement
|
||||
OrbitApp.registration "Announcement",:type=> 'ModuleApp' do
|
||||
|
||||
base_url File.expand_path File.dirname(__FILE__)
|
||||
personal_plugin :enable => true,:path=>"panel/announcement/plugin/profile"
|
||||
personal_plugin :enable => true,:path=>"panel/announcement/plugin/profile",:i18n=>'admin.announcement'
|
||||
|
||||
side_bar do
|
||||
head_label_i18n 'admin.announcement',:icon_class=>"icons-announcement"
|
||||
available_for [:admin,:guest,:manager,:sub_manager]
|
||||
active_for_controllers ({:private=>['bulletins', 'bulletin_categorys', 'approvals','tags']})
|
||||
active_for_object_auth ['BulletinCategory']
|
||||
|
||||
head_link_path "panel_announcement_back_end_bulletins_path"
|
||||
|
||||
context_link 'announcement.all_articles',
|
||||
:link_path=>"panel_announcement_back_end_bulletins_path" ,
|
||||
:priority=>1,
|
||||
:active_for_action=>{:bulletins=>:index}
|
||||
|
||||
context_link 'announcement.add_new',
|
||||
:link_path=>"new_panel_announcement_back_end_bulletin_path" ,
|
||||
:priority=>2,
|
||||
:active_for_action=>{:bulletins=>:new},
|
||||
:available_for => [:manager]
|
||||
|
||||
context_link 'announcement.categories',
|
||||
:link_path=>"panel_announcement_back_end_bulletin_categorys_path" ,
|
||||
:priority=>3,
|
||||
:active_for_action=>{:bulletin_categorys=>:index},
|
||||
:available_for => [:manager]
|
||||
|
||||
context_link 'announcement.tags',
|
||||
:link_path=>"panel_announcement_back_end_tags_path" ,
|
||||
:priority=>4,
|
||||
:active_for_action=>{:bulletin_categorys=>:index},
|
||||
:available_for => [:manager]
|
||||
|
||||
context_link 'announcement.approval_setting',
|
||||
:link_path=>"panel_announcement_back_end_approval_setting_path" ,
|
||||
:priority=>5,
|
||||
:active_for_object_auth => 'BulletinCategory',
|
||||
:available_for => [:manager]
|
||||
|
||||
context_link 'admin.module.authorization',
|
||||
:link_path=>"admin_module_app_manager_auth_proc_path(ModuleApp.first(conditions: {title: 'Announcement'}))",
|
||||
:priority=>6,
|
||||
:active_for_app_auth => 'Announcement',
|
||||
:available_for => [:manager]
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
||||
# OrbitApp.backend_side_bar 'News' do
|
||||
|
||||
# block :available_for => [:admin,:guest,:manager,:sub_manager],
|
||||
# :active_for_controllers=> ['news_bulletins', '/panel/news/back_end/tags', 'news_bulletin_categorys', 'news_approvals'],
|
||||
# :active_for_ob_auths_object => ['NewsBulletinCategory'],
|
||||
# :head_link => panel_news_back_end_news_bulletins_path ,
|
||||
# :head_label=> I18n.t('admin.news')
|
||||
|
||||
# context_link :link=>new_panel_news_back_end_news_bulletin_path ,
|
||||
# :priority=>1,:label=>I18n.t('announcement.add_new'),
|
||||
# :active_for_action=>{:news_bulletins=>:new}
|
||||
|
||||
# end
|
||||
end
|
||||
Reference in new issue
Block a user