Merge branch 'design_team' of github.com:Rulingcom/orbit into design_team
This commit is contained in:
commit
23d2d9a81e
|
@ -14,9 +14,9 @@ class Panel::Announcement::FrontEnd::BulletinsController < OrbitWidgetController
|
|||
if !params[:category_id].blank?
|
||||
@bulletins = Bulletin.can_display.where(:bulletin_category_id => params[:category_id]).any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page]).per(10)
|
||||
elsif !params[:tag_id].blank?
|
||||
tmp = NewsTag.find(params[:tag_id]) rescue nil
|
||||
tmp = NewsTag.where(key: params[:tag_id])[0] unless tmp
|
||||
@bulletins = tmp.bulletins.can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page]).per(10) rescue nil
|
||||
tmp = AnnouncementTag.find(params[:tag_id]) rescue nil
|
||||
tmp = AnnouncementTag.where(key: params[:tag_id])[0] unless tmp
|
||||
@bulletins = tmp.bulletins.can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page]).per(10)
|
||||
else
|
||||
@bulletins = Bulletin.can_display.any_of( {deadline: nil,:postdate.lte => date_now} , {:deadline.gte => date_now,:postdate.lte => date_now} ).desc( :is_top, :postdate).page( params[:page]).per(10)
|
||||
end
|
||||
|
|
Reference in New Issue