factcheck status for and
This commit is contained in:
		
							parent
							
								
									ef88c2dbc2
								
							
						
					
					
						commit
						d1dce81b3e
					
				| 
						 | 
					@ -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
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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: '不通過原因'
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue