hide category at front end
This commit is contained in:
parent
9b86e8f24e
commit
49862e70f9
|
@ -56,7 +56,7 @@ class Admin::ModuleAppsNewInterfaceController < OrbitBackendController
|
|||
def get_categorys(id = nil)
|
||||
@bulletin_categorys = []
|
||||
if(is_manager? || is_admin?)
|
||||
@bulletin_categorys = (id ? BulletinCategory.find(id).to_a : BulletinCategory.excludes('disabled' => true))
|
||||
@bulletin_categorys = (id ? BulletinCategory.find(id).to_a : BulletinCategory.all)
|
||||
elsif is_sub_manager?
|
||||
@bulletin_categorys = BulletinCategory.authed_for_user(current_user,'submit_new')
|
||||
end
|
||||
|
|
|
@ -49,7 +49,7 @@ class Admin::ObjectAuthsNewInterfaceController < OrbitBackendController
|
|||
# def get_categorys(id = nil)
|
||||
# @bulletin_categorys = []
|
||||
# if(is_manager? || is_admin?)
|
||||
# @bulletin_categorys = (id ? BulletinCategory.find(id).to_a : BulletinCategory.excludes('disabled' => true))
|
||||
# @bulletin_categorys = (id ? BulletinCategory.find(id).to_a : BulletinCategory.all)
|
||||
# elsif is_sub_manager?
|
||||
# @bulletin_categorys = BulletinCategory.authed_for_user(current_user,'submit_new')
|
||||
# end
|
||||
|
|
|
@ -54,7 +54,7 @@ class Panel::Announcement::BackEnd::ApprovalsController < OrbitBackendControlle
|
|||
# def get_categorys(id = nil)
|
||||
# @bulletin_categorys = []
|
||||
# if(is_manager? || is_admin?)
|
||||
# @bulletin_categorys = (id ? BulletinCategory.find(id).to_a : BulletinCategory.excludes('disabled' => true))
|
||||
# @bulletin_categorys = (id ? BulletinCategory.find(id).to_a : BulletinCategory.all)
|
||||
# elsif is_sub_manager?
|
||||
# @bulletin_categorys = BulletinCategory.authed_for_user(current_user,'submit_new')
|
||||
# end
|
||||
|
|
|
@ -43,7 +43,7 @@ class Panel::Announcement::FrontEnd::BulletinsController < OrbitWidgetController
|
|||
protected
|
||||
|
||||
def get_categorys
|
||||
@bulletin_categorys = BulletinCategory.excludes('disabled' => true)
|
||||
@bulletin_categorys = BulletinCategory.all
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -54,7 +54,7 @@ class Panel::News::BackEnd::NewsApprovalsController < OrbitBackendController
|
|||
def get_categorys(id = nil)
|
||||
@news_bulletin_categorys = []
|
||||
if(is_manager? || is_admin?)
|
||||
@news_bulletin_categorys = (id ? NewsBulletinCategory.find(id).to_a : NewsBulletinCategory.excludes('disabled' => true))
|
||||
@news_bulletin_categorys = (id ? NewsBulletinCategory.find(id).to_a : NewsBulletinCategory.all)
|
||||
elsif is_sub_manager?
|
||||
@news_bulletin_categorys = NewsBulletinCategory.authed_for_user(current_user,'submit_new')
|
||||
end
|
||||
|
|
|
@ -85,6 +85,7 @@ class Panel::News::BackEnd::NewsBulletinsController < OrbitBackendController
|
|||
# GET /news_bulletins/new
|
||||
# GET /news_bulletins/new.xml
|
||||
def new
|
||||
|
||||
@news_bulletin = NewsBulletin.new
|
||||
|
||||
@link_url = panel_news_back_end_news_bulletins_path
|
||||
|
|
|
@ -43,7 +43,7 @@ class Panel::News::FrontEnd::NewsBulletinsController < OrbitWidgetController
|
|||
protected
|
||||
|
||||
def get_categorys
|
||||
@news_bulletin_categorys = NewsBulletinCategory.excludes('disabled' => true)
|
||||
@news_bulletin_categorys = NewsBulletinCategory.all
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -62,7 +62,7 @@ class Panel::News::Widget::NewsBulletinsController < OrbitWidgetController
|
|||
protected
|
||||
|
||||
def get_categorys
|
||||
@news_bulletin_categorys = NewsBulletinCategory.excludes('disabled' => true)
|
||||
@news_bulletin_categorys = NewsBulletinCategory.all
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -26,7 +26,7 @@ class Panel::WebResource::FrontEnd::WebLinksController < OrbitWidgetController
|
|||
protected
|
||||
|
||||
def get_categorys
|
||||
@web_link_categorys = WebLinkCategory.excludes('disabled' => true)
|
||||
@web_link_categorys = WebLinkCategory.all
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -47,7 +47,7 @@ class Panel::WebResource::Widget::WebLinksController < OrbitWidgetController
|
|||
protected
|
||||
|
||||
def get_categorys
|
||||
@web_link_categorys = WebLinkCategory.excludes('disabled' => true)
|
||||
@web_link_categorys = WebLinkCategory.all
|
||||
end
|
||||
|
||||
def get_tags
|
||||
|
|
Loading…
Reference in New Issue