fix languages for title
This commit is contained in:
parent
002546ec7f
commit
086437694b
|
@ -18,14 +18,30 @@
|
||||||
</td>
|
</td>
|
||||||
<td><%= b.category.title %></td>
|
<td><%= b.category.title %></td>
|
||||||
<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? %>
|
<% if b.expired? %>
|
||||||
<%= b.title %> <span class='label'><%= t(:expired) %></span>
|
<%= title %> <span class='label'><%= t(:expired) %></span>
|
||||||
<% elsif b.rejected %>
|
<% 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? %>
|
<% elsif !b.approved? %>
|
||||||
<a href="<%=page_for_bulletin(b)%>" target="_blank"><%= b.title %></a> <span class='label'><%= t(:pending) %></span>
|
<a href="<%=page_for_bulletin(b)%>" target="_blank"><%= title %></a> <span class='label'><%= t(:pending) %></span>
|
||||||
<% else %>
|
<% else %>
|
||||||
<a href="<%=page_for_bulletin(b)%>" target="_blank"><%= b.title %></a>
|
<a href="<%=page_for_bulletin(b)%>" target="_blank"><%= title %></a>
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="quick-edit">
|
<div class="quick-edit">
|
||||||
<ul class="nav nav-pills">
|
<ul class="nav nav-pills">
|
||||||
|
|
Reference in New Issue