From 491ef9237cb27fb91007bf266326512e8366f6ee Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Fri, 19 Sep 2014 15:28:17 +0800 Subject: [PATCH] added table header for table layout --- app/controllers/announcements_controller.rb | 9 +++++++-- config/locales/en.yml | 6 ++++++ config/locales/zh_tw.yml | 6 ++++++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/app/controllers/announcements_controller.rb b/app/controllers/announcements_controller.rb index 6828bd2..f697894 100644 --- a/app/controllers/announcements_controller.rb +++ b/app/controllers/announcements_controller.rb @@ -14,7 +14,7 @@ class AnnouncementsController < ApplicationController "title" => a.title, "subtitle" => a.subtitle, "statuses" => statuses, - + "category" => a.category.title, "postdate" => a.postdate.strftime("%b %d, %Y at %I:%M %p"), "date" => a.postdate.strftime("%F"), "year" => a.postdate.strftime("%Y"), @@ -36,7 +36,12 @@ class AnnouncementsController < ApplicationController { "announcements" => anns, "extras" => { - "widget-title"=>t('announcement.announcement') + "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') }, "total_pages" => announcements.total_pages } diff --git a/config/locales/en.yml b/config/locales/en.yml index 9b2c3bf..f6c8192 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1,6 +1,12 @@ en: announcement: + table: + title : Title + date : Date + status : Status + sub_title: Sub Title + category: Category add_new: Add New all_articles: All Articles announcement: Announcement diff --git a/config/locales/zh_tw.yml b/config/locales/zh_tw.yml index 43cd4d8..a32222f 100644 --- a/config/locales/zh_tw.yml +++ b/config/locales/zh_tw.yml @@ -1,6 +1,12 @@ zh_tw: announcement: + table: + title : 標題 + date : 張貼日期 + status : 標籤 + sub_title: 副標題 + category: 類別 add_new: 新建 all_articles: 文章列表 announcement: 公告