2014-07-21 06:36:17 +00:00
|
|
|
<script>
|
2014-07-28 07:09:27 +00:00
|
|
|
if(document.querySelectorAll("#orbit-bar").length==0) location.reload();
|
2014-07-21 06:36:17 +00:00
|
|
|
</script>
|
|
|
|
|
2014-05-14 11:52:06 +00:00
|
|
|
<table class="table main-list">
|
2014-08-07 10:46:24 +00:00
|
|
|
<thead>
|
|
|
|
<tr class="sort-header">
|
|
|
|
<% @table_fields.each do |f| %>
|
2016-03-14 07:47:38 +00:00
|
|
|
<% if f == "archive.downloaded_times" %>
|
|
|
|
<%= thead(f,true,false) %>
|
|
|
|
<% else %>
|
|
|
|
<%= thead(f) %>
|
|
|
|
<% end %>
|
2014-08-07 10:46:24 +00:00
|
|
|
<% end %>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<% @archives.each do |archive| %>
|
|
|
|
<tr>
|
|
|
|
<td><%= archive.status_for_table %></td>
|
2014-12-11 09:43:16 +00:00
|
|
|
<td>
|
|
|
|
<%= archive.category.title rescue "" %>
|
|
|
|
<% if (archive.category.disable rescue false) %>
|
|
|
|
<span class='label'><%= t(:disabled) %></span>
|
|
|
|
<% end %>
|
|
|
|
</td>
|
2014-08-07 10:46:24 +00:00
|
|
|
<td>
|
2019-09-16 12:35:57 +00:00
|
|
|
<a href="/admin/archive_files/show?title=<%= archive.title %>" target="_blank"><%= archive.title %></a>
|
2014-08-07 10:46:24 +00:00
|
|
|
<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>
|
2018-01-25 09:24:39 +00:00
|
|
|
<li><a href="/admin/archive_files/<%= archive.id.to_s %>" class="delete text-error" data-method="delete" data-confirm="Are you sure?"><%= t(:delete_) %></a></li>
|
2014-08-07 10:46:24 +00:00
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
<td><%= format_value archive.updated_at rescue nil %></td>
|
|
|
|
<td><%= User.find(archive.update_user_id).user_name rescue nil %></td>
|
2015-03-18 09:59:03 +00:00
|
|
|
<% download_total = 0
|
|
|
|
archive.archive_file_multiples.each do |afm|
|
|
|
|
download_total = download_total + afm.download_count
|
|
|
|
end
|
|
|
|
%>
|
|
|
|
<td><%= download_total %></td>
|
2014-08-07 10:46:24 +00:00
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</tbody>
|
2014-07-04 07:54:11 +00:00
|
|
|
</table>
|
|
|
|
|
|
|
|
<%=
|
|
|
|
content_tag :div, class: "bottomnav clearfix" do
|
2021-06-11 04:21:02 +00:00
|
|
|
content_tag(:div, paginate(@archives), class: "pagination pagination-centered") +
|
|
|
|
content_tag(:div, link_to(t(:new_),new_admin_archive_file_path, :class=>"btn btn-primary"), class: "pull-right")
|
2014-07-04 07:54:11 +00:00
|
|
|
end
|
|
|
|
%>
|