2014-07-21 06:34:34 +00:00
|
|
|
<script>
|
2014-07-28 07:08:41 +00:00
|
|
|
if(document.querySelectorAll("#orbit-bar").length==0) location.reload();
|
2014-07-21 06:34:34 +00:00
|
|
|
</script>
|
|
|
|
|
2014-05-02 10:21:51 +00:00
|
|
|
<table class="table main-list">
|
|
|
|
<thead>
|
|
|
|
<tr class="sort-header">
|
|
|
|
<% @table_fields.each do |f| %>
|
|
|
|
<%= thead(f) %>
|
|
|
|
<% end %>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<% @bulletins.each do |b| %>
|
|
|
|
<tr>
|
2014-08-08 03:45:33 +00:00
|
|
|
<td>
|
|
|
|
<%= b.status_for_table %>
|
|
|
|
</td>
|
2014-12-11 09:41:42 +00:00
|
|
|
<td>
|
|
|
|
<%= b.category.title rescue "" %>
|
|
|
|
<% if (b.category.disable rescue false) %>
|
|
|
|
<span class='label'><%= t(:disabled) %></span>
|
|
|
|
<% end %>
|
|
|
|
</td>
|
2014-05-02 10:21:51 +00:00
|
|
|
<td>
|
2016-07-20 12:35:23 +00:00
|
|
|
<% if b.expired? || (b.category.disable rescue false)%>
|
2020-04-23 08:52:53 +00:00
|
|
|
<%= b.title.to_s.html_safe %>
|
2016-07-20 12:35:23 +00:00
|
|
|
<% else %>
|
2020-04-23 08:52:53 +00:00
|
|
|
<a href="<%= page_for_bulletin(b) %>" target="_blank"><%= b.title.to_s.html_safe %></a>
|
2016-07-20 12:35:23 +00:00
|
|
|
<% end %>
|
|
|
|
|
2014-08-08 03:45:33 +00:00
|
|
|
<% if b.expired? %>
|
2016-07-20 12:35:23 +00:00
|
|
|
<span class='label'><%= t(:expired) %></span>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% if b.reapproval %>
|
|
|
|
<span class='label'><%= t("announcement.reapproval") + " " + t(:pending) %></span>
|
|
|
|
<% end %>
|
|
|
|
<% if b.rejected %>
|
|
|
|
<span class='label'><%= t(:rejected) %> : <%= b.rejection_reason rescue "" %></span>
|
|
|
|
<% end %>
|
|
|
|
<% if !b.approved? && !b.rejected %>
|
2014-12-11 09:41:42 +00:00
|
|
|
<span class='label'><%= t(:pending) %></span>
|
2014-08-08 03:45:33 +00:00
|
|
|
<% end %>
|
2014-05-02 10:21:51 +00:00
|
|
|
<div class="quick-edit">
|
|
|
|
<ul class="nav nav-pills">
|
2014-07-19 19:30:33 +00:00
|
|
|
<li><a href="#" class="detail-row" onclick="$('#<%= "#{b.id.to_s}-detail" %>').slideToggle(300); return false;"><%= t(:detail) %></a></li>
|
2014-07-31 09:12:13 +00:00
|
|
|
<% if can_edit_or_delete?(b) %>
|
|
|
|
<li><a href="/admin/announcements/<%=b.id.to_s%>/edit"><%= t(:edit) %></a></li>
|
|
|
|
<li><a href="#" class="delete text-error" rel="/admin/announcements/<%=b.id.to_s%>"><%= t(:delete_) %></a></li>
|
2016-08-05 12:00:34 +00:00
|
|
|
<% end %>
|
|
|
|
<% if ((!b.approved && !b.rejected && !b.reapproval) || (b.rejected && b.reapproval)) && user_can_approve?(b) %>
|
|
|
|
<li><a href="<%= page_for_bulletin(b) %>" class="approval_button" data-id="<%= b.id.to_s %>" ><%= t("announcement.approval_waiting") %></a></li>
|
2014-07-31 09:12:13 +00:00
|
|
|
<% end %>
|
2014-05-02 10:21:51 +00:00
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
<td><%= format_value b.postdate %></td>
|
2014-08-08 03:45:33 +00:00
|
|
|
<td class="<%= b.expired? ? "expired" : "" %>"><%= format_value b.deadline %></td>
|
2020-07-30 14:12:21 +00:00
|
|
|
<td><%= link_to b.bulletin_comments.count.to_s,"/#{I18n.locale}/admin/announcements/#{b.id}/comment" %></td>
|
2021-12-28 05:55:50 +00:00
|
|
|
<td><%= b.update_user.user_name rescue ""%><br><%= format_value b.updated_at %></td>
|
2014-05-02 10:21:51 +00:00
|
|
|
</tr>
|
2014-06-24 04:25:05 +00:00
|
|
|
<tr class="footable-row-detail">
|
|
|
|
<td class="footable-cell-detail" colspan="6">
|
|
|
|
<div id="<%= "#{b.id.to_s}-detail" %>" class="footable-row-detail-inner" style="display: none;">
|
2017-01-17 05:43:58 +00:00
|
|
|
<div>
|
|
|
|
<strong><%= t(:view_count) %></strong> :
|
|
|
|
<span class="label label-info"><%= b.view_count %></span>
|
|
|
|
</div>
|
2014-06-24 04:25:05 +00:00
|
|
|
<div>
|
|
|
|
<strong><%= t(:tags) %></strong> :
|
|
|
|
<% b.tags.each do |tag| %>
|
|
|
|
<span class="label label-warning"><%= tag.name %></span>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<strong><%= t("announcement.email_to") %></strong> :
|
|
|
|
<% b.email_members.each do |member| %>
|
|
|
|
<span class="label"><%= member.name %></span>
|
|
|
|
<% end %>
|
|
|
|
<% unless b.other_mailaddress.nil? %>
|
|
|
|
<% b.other_mailaddress.split(',').each do |mailaddress| %>
|
|
|
|
<span class="label"><%= mailaddress %></span>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
</tr>
|
2014-05-02 10:21:51 +00:00
|
|
|
<% end %>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<%=
|
|
|
|
content_tag :div, class: "bottomnav clearfix" do
|
2021-06-11 03:59:31 +00:00
|
|
|
content_tag(:div, paginate(@bulletins), class: "pagination pagination-centered") +
|
|
|
|
content_tag(:div, link_to(t(:new_),new_admin_announcement_path, :class=>"btn btn-primary"), class: "pull-right")
|
2014-05-02 10:21:51 +00:00
|
|
|
end
|
2014-07-21 06:11:58 +00:00
|
|
|
%>
|