factcheck status for and

This commit is contained in:
Matthew K. Fu JuYuan 2012-04-05 18:27:23 +08:00 committed by Christophe Vilayphiou
parent 5417c6fec0
commit 1fd38c8135
3 changed files with 13 additions and 0 deletions

View File

@ -79,6 +79,17 @@ class Bulletin
end 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? def is_expired?
Date.today > self.deadline ? true : false rescue false Date.today > self.deadline ? true : false rescue false
#some dates might sat as nil so rescue false #some dates might sat as nil so rescue false

View File

@ -10,6 +10,7 @@
<% if bulletin.is_hidden? %> <% if bulletin.is_hidden? %>
<span class="label"><%= t(:hidden) %></span> <span class="label"><%= t(:hidden) %></span>
<% end %> <% end %>
<%= bulletin.status %>
</td> </td>
<td><%= bulletin.bulletin_category.i18n_variable[I18n.locale] %></td> <td><%= bulletin.bulletin_category.i18n_variable[I18n.locale] %></td>
<td> <td>

View File

@ -33,6 +33,7 @@ zh_tw:
fact_check: 公告審核 fact_check: 公告審核
fact_check_setting: 審核設定 fact_check_setting: 審核設定
fact_check_stat: 審核狀況 fact_check_stat: 審核狀況
fact_check_pending: 審核中
fact_check_not_pass: '不通過' fact_check_not_pass: '不通過'
fact_check_pass: '通過' fact_check_pass: '通過'
fact_check_not_pass_reason: '不通過原因' fact_check_not_pass_reason: '不通過原因'