update announcement sort
This commit is contained in:
parent
4123610d32
commit
b8144754b3
|
@ -1,7 +1,7 @@
|
|||
class AnnouncementsController < ApplicationController
|
||||
|
||||
def index
|
||||
announcements = Bulletin.where(:title.ne => "",:is_preview.in=>[false,nil]).can_display.is_approved.order_by(:created_at=>'desc').filter_by_categories.filter_by_tags(OrbitHelper.params['tags'])
|
||||
announcements = Bulletin.where(:title.ne => "",:is_preview.in=>[false,nil]).can_display.is_approved.order_by(:postdate=>'desc').filter_by_categories.filter_by_tags(OrbitHelper.params['tags'])
|
||||
|
||||
anns = announcements.collect do |a|
|
||||
statuses = a.statuses_with_classname.collect do |status|
|
||||
|
@ -42,7 +42,7 @@ class AnnouncementsController < ApplicationController
|
|||
end
|
||||
|
||||
def widget
|
||||
announcements = Bulletin.where(:title.ne => "",:is_preview.in=>[false,nil]).can_display.is_approved.order_by(:created_at=>'desc').filter_by_widget_categories.filter_by_tags(OrbitHelper.widget_tags)
|
||||
announcements = Bulletin.where(:title.ne => "",:is_preview.in=>[false,nil]).can_display.is_approved.order_by(:postdate=>'desc').filter_by_widget_categories.filter_by_tags(OrbitHelper.widget_tags)
|
||||
page = Page.where(:module => "announcement").first rescue nil
|
||||
|
||||
anns = announcements.collect do |a|
|
||||
|
|
Loading…
Reference in New Issue