<% @table_fields.each do |f| %> <%= thead(f) %> <% end %> <% @news_bulletin.each do |b| %> <% end %>
<%= b.status_for_table %> <%= b.category.title rescue "" %> <% if b.expired? %> <% if b.rejected %> <% if !b.title_translations["zh_tw"].blank? %> <%= b.title_translations["zh_tw"] %><%= t(:expired)+','+t(:rejected) %> : <%= b.rejection_reason rescue "" %>
<% end %> <% if !b.title_translations["en"].blank? %> <%= b.title_translations["en"] %><%= t(:expired)+','+t(:rejected) %> : <%= b.rejection_reason rescue "" %> <% end %> <% else %> <% if !b.title_translations["zh_tw"].blank? %> <%= b.title_translations["zh_tw"] %> <%= t(:expired) %>
<% end %> <% if !b.title_translations["en"].blank? %> <%= b.title_translations["en"] %> <%= t(:expired) %> <% end %> <% end %> <% elsif b.rejected && b.reapproval %> <% url = page_for_bulletin(b) %> <% if !b.title_translations["zh_tw"].blank? %> <%= b.title_translations["zh_tw"] %> <%= t("news.reapproval") %> : <%= t(:pending) %>
<% end %> <% if !b.title_translations["en"].blank? %> <%= b.title_translations["en"] %> <%= t("news.reapproval") %> : <%= t(:pending) %> <% end %> <% elsif b.rejected %> <% url = page_for_bulletin(b) %> <% if !b.title_translations["zh_tw"].blank? %> <%= b.title_translations["zh_tw"] %> <%= t(:rejected) %> : <%= b.rejection_reason rescue "" %>
<% end %> <% if !b.title_translations["en"].blank? %> <%= b.title_translations["en"] %> <%= t(:rejected) %> : <%= b.rejection_reason rescue "" %> <% end %> <% elsif !b.approved? %> <% url = page_for_news_bulletin(b) %> <% if !b.title_translations["zh_tw"].blank? %> <%= b.title_translations["zh_tw"] %> <%= t(:pending) %>
<% end %> <% if !b.title_translations["en"].blank? %> <%= b.title_translations["en"] %> <%= t(:pending) %> <% end %> <% else %> <% url = page_for_news_bulletin(b) %> <% if !b.title_translations["zh_tw"].blank? %> <%= b.title_translations["zh_tw"] %>
<% end %> <% if !b.title_translations["en"].blank? %> <%= b.title_translations["en"] %> <% end %> <% end %>
<%= format_value b.postdate %> "><%= format_value b.deadline %> <%= content_tag(:div, image_tag(b.image.file.blank? ? "/assets/news_alt.jpg" : b.image.url), {:class => "img-peview", :rel=>"popover", "data-content"=>"#{image_tag(b.image.file.blank? ? "/assets/news_alt.jpg" : b.image.url)}", "data-trigger"=>"hover", "data-placement"=>"left"}) %> <% Unit.where({:id => b.unit_id}).each do |u| %> <%= u.name %> <% end %> <% Department.where({:id => b.department_id}).each do |d| %> -<%= d.name %> <% end %> <%= b.view_count %>
" class="footable-row-detail-inner" style="display: none;">
<%= t(:tags) %> : <% b.tags.each do |tag| %> <%= tag.name %> <% end %>
<%= t("news.email_to") %> : <% b.email_members.each do |member| %> <%= member.name %> <% end %> <% unless b.other_mailaddress.nil? %> <% b.other_mailaddress.split(',').each do |mailaddress| %> <%= mailaddress %> <% end %> <% end %>
<%= content_tag :div, class: "bottomnav clearfix" do content_tag :div, paginate(@news_bulletin), class: "pagination pagination-centered" end %> <% content_for :page_specific_css do %> <% end %>