modify widget display in announcement show page
This commit is contained in:
parent
dc4496fedd
commit
8e0a539c04
|
@ -90,8 +90,9 @@ class AnnouncementsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def widget
|
def widget
|
||||||
|
uid = OrbitHelper.params[:uid] rescue ""
|
||||||
tags = ["all"] if OrbitHelper.widget_tags.empty?
|
tags = ["all"] if OrbitHelper.widget_tags.empty?
|
||||||
announcements = Bulletin.where(:title.ne => "",:is_preview.in=>[false,nil]).and(:title.ne => nil).can_display.is_approved.order_by(:postdate=>'desc').filter_by_widget_categories.filter_by_tags(tags)
|
announcements = Bulletin.where(:title.ne => "",:is_preview.in=>[false,nil],:uid.ne => uid).and(:title.ne => nil).can_display.is_approved.order_by(:postdate=>'desc').filter_by_widget_categories.filter_by_tags(tags)
|
||||||
page = Page.where(:module => "announcement").first rescue nil
|
page = Page.where(:module => "announcement").first rescue nil
|
||||||
anns = announcements.collect do |a|
|
anns = announcements.collect do |a|
|
||||||
statuses = a.statuses_with_classname.collect do |status|
|
statuses = a.statuses_with_classname.collect do |status|
|
||||||
|
|
Loading…
Reference in New Issue