From e1a67a2d6f3db986f6fab2e66f643aa6ec805e54 Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Fri, 19 Sep 2014 15:54:41 +0800 Subject: [PATCH] some changes in frontend controller --- app/controllers/announcements_controller.rb | 31 ++++++++++++--------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/app/controllers/announcements_controller.rb b/app/controllers/announcements_controller.rb index 81321b7..1c421aa 100644 --- a/app/controllers/announcements_controller.rb +++ b/app/controllers/announcements_controller.rb @@ -37,11 +37,11 @@ class AnnouncementsController < ApplicationController "announcements" => anns, "extras" => { "widget-title" =>t('announcement.announcement'), - "title_head" => t('announcement.table.title'), - "date_head" => t('announcement.table.date'), - "status_head" => t('announcement.table.status'), - "sub_title_head" => t('announcement.table.sub_title'), - "category_head" => t('announcement.table.category') + "title-head" => t('announcement.table.title'), + "date-head" => t('announcement.table.date'), + "status-head" => t('announcement.table.status'), + "subtitle-head" => t('announcement.table.sub_title'), + "category-head" => t('announcement.table.category') }, "total_pages" => announcements.total_pages } @@ -62,7 +62,7 @@ class AnnouncementsController < ApplicationController "title" => a.title, "subtitle" => a.subtitle, "statuses" => statuses, - + "category" => a.category.title, "postdate" => a.postdate.strftime("%d"), "date" => a.postdate.strftime("%F"), "year" => a.postdate.strftime("%Y"), @@ -84,11 +84,11 @@ class AnnouncementsController < ApplicationController "announcements" => anns, "extras" => { "more_url"=>OrbitHelper.widget_more_url, - "title_head" => t('announcement.table.title'), - "date_head" => t('announcement.table.date'), - "status_head" => t('announcement.table.status'), - "sub_title_head" => t('announcement.table.sub_title'), - "category_head" => t('announcement.table.category') + "title-head" => t('announcement.table.title'), + "date-head" => t('announcement.table.date'), + "status-head" => t('announcement.table.status'), + "subtitle-head" => t('announcement.table.sub_title'), + "category-head" => t('announcement.table.category') } } end @@ -107,7 +107,7 @@ class AnnouncementsController < ApplicationController "title" => a.title, "subtitle" => a.subtitle, "statuses" => statuses, - + "category" => a.category.title, "postdate" => a.postdate.strftime("%d"), "date" => a.postdate.strftime("%F"), "year" => a.postdate.strftime("%Y"), @@ -128,7 +128,12 @@ class AnnouncementsController < ApplicationController { "announcements" => anns, "extras" => { - "more_url"=>OrbitHelper.widget_more_url + "more_url"=>OrbitHelper.widget_more_url, + "title-head" => t('announcement.table.title'), + "date-head" => t('announcement.table.date'), + "status-head" => t('announcement.table.status'), + "subtitle-head" => t('announcement.table.sub_title'), + "category-head" => t('announcement.table.category') } } end