2018-10-04 02:47:23 +00:00
|
|
|
<script>
|
|
|
|
if(document.querySelectorAll("#orbit-bar").length==0) location.reload();
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<table class="table main-list">
|
|
|
|
<thead>
|
|
|
|
<tr class="sort-header">
|
|
|
|
<% @table_fields.each do |f| %>
|
|
|
|
<%= thead(f) %>
|
|
|
|
<% end %>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2023-06-04 14:41:53 +00:00
|
|
|
<% @publications.each do |node| %>
|
2018-10-04 02:47:23 +00:00
|
|
|
<tr>
|
|
|
|
<td>
|
2023-06-04 14:41:53 +00:00
|
|
|
<%= link_to node.title, publication_path(node.id) %>
|
2018-10-04 02:47:23 +00:00
|
|
|
<div class="quick-edit">
|
|
|
|
<ul class="nav nav-pills">
|
|
|
|
<% if can_edit_or_delete?(node) %>
|
|
|
|
<% if can_edit_or_delete?(node) %>
|
2023-06-04 14:41:53 +00:00
|
|
|
<li><a href="<%= admin_publication_path(node.id) %>"><%= t("publications.add_chapter") %></a></li>
|
2018-10-04 02:47:23 +00:00
|
|
|
<% end %>
|
2023-06-04 14:41:53 +00:00
|
|
|
<li><%= link_to t(:edit), edit_admin_publication_path(node.id) %></li>
|
|
|
|
<li><%= link_to t(:delete_), admin_publication_path(node.id), method: :delete, data: {confirm: "Are you sure?"} %></li>
|
2018-10-04 02:47:23 +00:00
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
<td><%= node.status_for_table %></td>
|
|
|
|
<td><%= node.author %></td>
|
|
|
|
<td><%= node.pub_date.strftime('%Y-%m-%d') %></td>
|
|
|
|
<td>
|
|
|
|
<%= node.category.title rescue "" %>
|
|
|
|
<% if (node.category.disable rescue false) %>
|
|
|
|
<span class='label'><%= t(:disabled) %></span>
|
|
|
|
<% end %>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<%=
|
|
|
|
content_tag :div, class: "bottomnav clearfix" do
|
2023-06-04 14:41:53 +00:00
|
|
|
content_tag :div, paginate(@publications), class: "pagination pagination-centered"
|
2018-10-04 02:47:23 +00:00
|
|
|
end
|
|
|
|
%>
|