From 363fafaa98949087579b94d8209cbe504dc61c5f Mon Sep 17 00:00:00 2001 From: JiangRu Date: Mon, 1 Dec 2014 13:48:02 +0800 Subject: [PATCH] update widget read more url for designer --- app/controllers/announcements_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/announcements_controller.rb b/app/controllers/announcements_controller.rb index 2a398cd..d3569b2 100644 --- a/app/controllers/announcements_controller.rb +++ b/app/controllers/announcements_controller.rb @@ -43,6 +43,7 @@ class AnnouncementsController < ApplicationController 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) + page = Page.where(:module => "announcement").first rescue nil anns = announcements.collect do |a| statuses = a.statuses_with_classname.collect do |status| @@ -73,7 +74,8 @@ class AnnouncementsController < ApplicationController "author-head" => t('announcement.table.author'), "status-head" => t('announcement.table.status'), "subtitle-head" => t('announcement.table.sub_title'), - "category-head" => t('announcement.table.category') + "category-head" => t('announcement.table.category'), + "read_more" => "/#{I18n.locale.to_s + page.url}" } } end