fix for no announcement page in widget
This commit is contained in:
parent
4f9e75bc6a
commit
5cfea2946d
|
@ -54,7 +54,6 @@ class AnnouncementsController < ApplicationController
|
|||
def widget
|
||||
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|
|
||||
statuses = a.statuses_with_classname.collect do |status|
|
||||
{
|
||||
|
@ -95,7 +94,7 @@ class AnnouncementsController < ApplicationController
|
|||
"category-head" => t('announcement.table.category'),
|
||||
"link-head" => t('announcement.table.link'),
|
||||
"file-head" => t('announcement.table.file'),
|
||||
"read_more" => "/#{I18n.locale.to_s + page.url}"
|
||||
"read_more" => ("/#{I18n.locale.to_s + page.url}" rescue "")
|
||||
}
|
||||
}
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue