fix languages for title
This commit is contained in:
parent
1a940af1c5
commit
ee7a9d8b31
|
@ -18,14 +18,30 @@
|
|||
</td>
|
||||
<td><%= b.category.title %></td>
|
||||
<td>
|
||||
<%
|
||||
case I18n.locale
|
||||
when :en
|
||||
if b.title_translations[I18n.locale].blank?
|
||||
title = b.title_translations["zh_tw"]
|
||||
else
|
||||
title = b.title_translations[I18n.locale]
|
||||
end
|
||||
when :zh_tw
|
||||
if b.title_translations[I18n.locale].blank?
|
||||
title = b.title_translations["en"]
|
||||
else
|
||||
title = b.title_translations[I18n.locale]
|
||||
end
|
||||
end
|
||||
%>
|
||||
<% if b.expired? %>
|
||||
<%= b.title %> <span class='label'><%= t(:expired) %></span>
|
||||
<%= title %> <span class='label'><%= t(:expired) %></span>
|
||||
<% elsif b.rejected %>
|
||||
<a href="<%=page_for_bulletin(b)%>" target="_blank"><%= b.title %></a> <span class='label'><%= t(:rejected) %> : <%= b.rejection_reason rescue "" %></span>
|
||||
<a href="<%=page_for_bulletin(b)%>" target="_blank"><%= title %></a> <span class='label'><%= t(:rejected) %> : <%= b.rejection_reason rescue "" %></span>
|
||||
<% elsif !b.approved? %>
|
||||
<a href="<%=page_for_news_bulletin(b)%>" target="_blank"><%= b.title %></a> <span class='label'><%= t(:pending) %></span>
|
||||
<a href="<%=page_for_news_bulletin(b)%>" target="_blank"><%= title %></a> <span class='label'><%= t(:pending) %></span>
|
||||
<% else %>
|
||||
<a href="<%=page_for_news_bulletin(b)%>" target="_blank"><%= b.title %></a>
|
||||
<a href="<%=page_for_news_bulletin(b)%>" target="_blank"><%= title %></a>
|
||||
<% end %>
|
||||
<div class="quick-edit">
|
||||
<ul class="nav nav-pills">
|
||||
|
|
Loading…
Reference in New Issue