two major fix for site setting and bulletin controller
This commit is contained in:
parent
9e432a5a93
commit
ed569601c3
|
@ -21,12 +21,16 @@ class Admin::PagesController < Admin::ItemsController
|
|||
end
|
||||
|
||||
def update
|
||||
if params[:page][:category]
|
||||
if params[:page][:category][0] == ""
|
||||
params[:page][:category] = []
|
||||
end
|
||||
end
|
||||
if params[:page][:tag]
|
||||
if params[:page][:tag][0] == ""
|
||||
params[:page][:tag] = []
|
||||
end
|
||||
end
|
||||
@item = Page.find(params[:id])
|
||||
if @item.module_app && @item.module_app.key == 'page_content' && @item.page_contexts.blank?
|
||||
@item.page_contexts.build(:create_user_id => current_user.id, :update_user_id => current_user.id )
|
||||
|
|
|
@ -26,7 +26,7 @@ class Panel::Announcement::FrontEnd::BulletinsController < OrbitWidgetController
|
|||
end
|
||||
|
||||
def index
|
||||
|
||||
@bulletins = get_bulletins_for_index
|
||||
end
|
||||
|
||||
def get_bulletins_for_index
|
||||
|
@ -47,7 +47,6 @@ class Panel::Announcement::FrontEnd::BulletinsController < OrbitWidgetController
|
|||
@bulletins = Bulletin.available_for_lang(I18n.locale).can_display.where(:category_id.in => params[:category_id], :tagged_ids.in => params[:tag_id]).desc( :is_top, :postdate).page( params[:page_main]).per(@page_num)
|
||||
# @bulletins = Bulletin.available_for_lang(I18n.locale).can_display.where(:category_id.in=>params[:category_id],:tagged_ids.in=>params[:tag_id])
|
||||
@current_category = BulletinCategory.from_id(params[:category_id]) rescue nil
|
||||
debugger
|
||||
elsif !params[:category_id].blank?
|
||||
@bulletins = Bulletin.all.available_for_lang(I18n.locale).can_display.where(:category_id.in => params[:category_id]).desc( :is_top, :postdate).page( params[:page_main]).per(@page_num)
|
||||
@current_category = BulletinCategory.from_id(params[:category_id]) rescue nil
|
||||
|
|
Reference in New Issue