44 lines
1.3 KiB
Plaintext
44 lines
1.3 KiB
Plaintext
<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>
|
|
<% @publications.each do |node| %>
|
|
<tr>
|
|
<td>
|
|
<%= link_to node.title, page_for_publication(node) %>
|
|
<div class="quick-edit">
|
|
<ul class="nav nav-pills">
|
|
<% if can_edit_or_delete?(node) %>
|
|
<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>
|
|
<% end %>
|
|
</ul>
|
|
</div>
|
|
</td>
|
|
<td><%= link_to node.chapters.length, admin_publication_path(node.id) %></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
|
|
content_tag :div, paginate(@publications), class: "pagination pagination-centered"
|
|
end
|
|
%>
|