From d1dce81b3efc82e96341538e6033599e49852689 Mon Sep 17 00:00:00 2001 From: "Matthew K. Fu JuYuan" Date: Thu, 5 Apr 2012 18:27:23 +0800 Subject: [PATCH] factcheck status for and --- .../announcement/app/models/bulletin.rb | 11 +++++++++++ .../back_end/bulletins/_bulletin.html.erb | 1 + .../announcement/config/locales/zh_tw.yml | 1 + 3 files changed, 13 insertions(+) diff --git a/vendor/built_in_modules/announcement/app/models/bulletin.rb b/vendor/built_in_modules/announcement/app/models/bulletin.rb index e24f7f21..4808b3a9 100644 --- a/vendor/built_in_modules/announcement/app/models/bulletin.rb +++ b/vendor/built_in_modules/announcement/app/models/bulletin.rb @@ -79,6 +79,17 @@ class Bulletin end + def status + case self.is_checked + when nil + I18n.t('announcement.bulletin.fact_check_pending') + when true + I18n.t('announcement.bulletin.fact_check_pass') + when false + I18n.t('announcement.bulletin.fact_check_not_pass') + end + end + def is_expired? Date.today > self.deadline ? true : false rescue false #some dates might sat as nil so rescue false diff --git a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_bulletin.html.erb b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_bulletin.html.erb index 62b28c0c..73d37efd 100644 --- a/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_bulletin.html.erb +++ b/vendor/built_in_modules/announcement/app/views/panel/announcement/back_end/bulletins/_bulletin.html.erb @@ -10,6 +10,7 @@ <% if bulletin.is_hidden? %> <%= t(:hidden) %> <% end %> + <%= bulletin.status %> <%= bulletin.bulletin_category.i18n_variable[I18n.locale] %> diff --git a/vendor/built_in_modules/announcement/config/locales/zh_tw.yml b/vendor/built_in_modules/announcement/config/locales/zh_tw.yml index e2dfd957..bee4b04e 100644 --- a/vendor/built_in_modules/announcement/config/locales/zh_tw.yml +++ b/vendor/built_in_modules/announcement/config/locales/zh_tw.yml @@ -33,6 +33,7 @@ zh_tw: fact_check: 公告審核 fact_check_setting: 審核設定 fact_check_stat: 審核狀況 + fact_check_pending: 審核中 fact_check_not_pass: '不通過' fact_check_pass: '通過' fact_check_not_pass_reason: '不通過原因'