archive/app/views/admin/archive_files/_index.html.erb

42 lines
1.0 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>
<% @archives.each do |archive| %>
<tr>
<td>
<%= archive.status_for_table %>
</td>
<td>
<%= archive.category.title %>
</td>
<td>
<a href="#" target="_blank"><%= archive.title %></a>
<div class="quick-edit">
<ul class="nav nav-pills">
<% if can_edit_or_delete?(archive) %>
<li><a href="/<%= I18n.locale.to_s %>/admin/archive_files/<%= archive.id.to_s %>/edit"><%= t(:edit) %></a></li>
<li><a href="/admin/archive_files/<%= archive.id.to_s %>" data-method="delete" data-confirm="Are you sure?"><%= t(:delete_) %></a></li>
<% end %>
</ul>
</div>
</td>
</tr>
<% end %>
</tbody>
</table>
<%=
content_tag :div, class: "bottomnav clearfix" do
content_tag :div, paginate(@archives), class: "pagination pagination-centered"
end
%>