some changes in frontend controller

This commit is contained in:
Harry Bomrah 2014-09-19 15:54:41 +08:00
parent b2788d099c
commit e1a67a2d6f
1 changed files with 18 additions and 13 deletions

View File

@ -37,11 +37,11 @@ class AnnouncementsController < ApplicationController
"announcements" => anns, "announcements" => anns,
"extras" => { "extras" => {
"widget-title" =>t('announcement.announcement'), "widget-title" =>t('announcement.announcement'),
"title_head" => t('announcement.table.title'), "title-head" => t('announcement.table.title'),
"date_head" => t('announcement.table.date'), "date-head" => t('announcement.table.date'),
"status_head" => t('announcement.table.status'), "status-head" => t('announcement.table.status'),
"sub_title_head" => t('announcement.table.sub_title'), "subtitle-head" => t('announcement.table.sub_title'),
"category_head" => t('announcement.table.category') "category-head" => t('announcement.table.category')
}, },
"total_pages" => announcements.total_pages "total_pages" => announcements.total_pages
} }
@ -62,7 +62,7 @@ class AnnouncementsController < ApplicationController
"title" => a.title, "title" => a.title,
"subtitle" => a.subtitle, "subtitle" => a.subtitle,
"statuses" => statuses, "statuses" => statuses,
"category" => a.category.title,
"postdate" => a.postdate.strftime("%d"), "postdate" => a.postdate.strftime("%d"),
"date" => a.postdate.strftime("%F"), "date" => a.postdate.strftime("%F"),
"year" => a.postdate.strftime("%Y"), "year" => a.postdate.strftime("%Y"),
@ -84,11 +84,11 @@ class AnnouncementsController < ApplicationController
"announcements" => anns, "announcements" => anns,
"extras" => { "extras" => {
"more_url"=>OrbitHelper.widget_more_url, "more_url"=>OrbitHelper.widget_more_url,
"title_head" => t('announcement.table.title'), "title-head" => t('announcement.table.title'),
"date_head" => t('announcement.table.date'), "date-head" => t('announcement.table.date'),
"status_head" => t('announcement.table.status'), "status-head" => t('announcement.table.status'),
"sub_title_head" => t('announcement.table.sub_title'), "subtitle-head" => t('announcement.table.sub_title'),
"category_head" => t('announcement.table.category') "category-head" => t('announcement.table.category')
} }
} }
end end
@ -107,7 +107,7 @@ class AnnouncementsController < ApplicationController
"title" => a.title, "title" => a.title,
"subtitle" => a.subtitle, "subtitle" => a.subtitle,
"statuses" => statuses, "statuses" => statuses,
"category" => a.category.title,
"postdate" => a.postdate.strftime("%d"), "postdate" => a.postdate.strftime("%d"),
"date" => a.postdate.strftime("%F"), "date" => a.postdate.strftime("%F"),
"year" => a.postdate.strftime("%Y"), "year" => a.postdate.strftime("%Y"),
@ -128,7 +128,12 @@ class AnnouncementsController < ApplicationController
{ {
"announcements" => anns, "announcements" => anns,
"extras" => { "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 end