48 lines
1.5 KiB
Plaintext
48 lines
1.5 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, publication_path(node.id) %>
|
|
<div class="quick-edit">
|
|
<ul class="nav nav-pills">
|
|
<% if can_edit_or_delete?(node) %>
|
|
<% if can_edit_or_delete?(node) %>
|
|
<li><a href="<%= admin_publication_path(node.id) %>"><%= t("publications.add_chapter") %></a></li>
|
|
<% end %>
|
|
<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><%= 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
|
|
content_tag :div, paginate(@publications), class: "pagination pagination-centered"
|
|
end
|
|
%>
|