100 lines
3.8 KiB
Plaintext
100 lines
3.8 KiB
Plaintext
<section id="file_manager_section">
|
|
<h3><%= generate_breadcrumb %></h3>
|
|
<span class="btn-wrapper">
|
|
<% if @directory.count != 0 %>
|
|
<a href="javascript:void(0)" class="recover_all" data-prompt="<%=t('file_manager.are_you_sure_to_recover_all')%>" data-num="<%=@directory.count%>"data-unit="<%=t('file_manager.file_unit')%>" title="<%=t('file_manager.clean_up_recycle_bin')%>">
|
|
<%=t('file_manager.recover_all')%>
|
|
</a>
|
|
<a href="javascript:void(0)" class="clean_up_recycle_bin" data-prompt="<%=t('file_manager.are_you_sure_to_delete_files_permanently')%>" data-num="<%=@directory.count%>"data-unit="<%=t('file_manager.file_unit')%>" title="<%=t('file_manager.clean_up_recycle_bin')%>">
|
|
<%=t('file_manager.clean_up_recycle_bin')%>
|
|
</a>
|
|
<% end %>
|
|
</span>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<% if @display_module_name %>
|
|
<th><%= t("file_manager.module") %></th>
|
|
<% end %>
|
|
<th><%= t("file_manager.name") %></th>
|
|
<th><%= t("file_manager.size") %></th>
|
|
<th><%= t("file_manager.deleted_at") %></th>
|
|
<th><%= t("file_manager.updated_at") %></th>
|
|
<% unless @only_select_folder %>
|
|
<th><%= t("file_manager.recover") %></th>
|
|
<th><%= t("file_manager.delete_permanently") %></th>
|
|
<% end %>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @directory.each do |entry| %>
|
|
<% next if @relative_path.blank? && entry[:relative] == '..' %>
|
|
<tr>
|
|
<% if @display_module_name %>
|
|
<td>
|
|
<%
|
|
module_info = @module_info_dict[entry[:module]]
|
|
module_title = (module_info ? module_info[:title] : nil)
|
|
%>
|
|
<% if module_title %>
|
|
<%= link_to(module_title, "javascript:void(0)", class: "module-key", data: {'key'=>entry[:module]}) %>
|
|
<% end %>
|
|
</td>
|
|
<% end %>
|
|
<td class="name">
|
|
<%= link_to "javascript:void(0)", class: entry[:type].to_s, data: {'entry'=>entry[:entry], 'id'=> entry[:upload_id]} do %>
|
|
<%= fa_icon (entry[:type] == :file ? 'file' : 'folder') %>
|
|
<span class="filename"><%= entry[:name] %></span>
|
|
<% end %>
|
|
</td>
|
|
<td>
|
|
<%= entry[:size] %>
|
|
</td>
|
|
<td class="date">
|
|
<%= entry[:deleted_at] %>
|
|
</td>
|
|
<td class="date">
|
|
<%= entry[:date] %>
|
|
</td>
|
|
<% unless @only_select_folder %>
|
|
<td>
|
|
<% if entry[:entry] != './' && entry[:entry] != '../' %>
|
|
<%= link_to 'javascript:void(0)', class: 'recover', data: { "tmp-confirm"=> t("file_manager.are_you_sure_to_recover"), "link"=> recover_admin_file_manager_path(entry[:id]) } do %>
|
|
<%= fa_icon 'trash-restore' %> <%= t("file_manager.recover") %>
|
|
<% end %>
|
|
<% end %>
|
|
</td>
|
|
<td>
|
|
<% if entry[:entry] != './' && entry[:entry] != '../' %>
|
|
<%= link_to "javascript:void(0)", class: 'delete', data: { "tmp-confirm"=> t("file_manager.are_you_sure_you_want_to_delete_file_permanently",:file=>entry[:org_path]), "link"=> admin_file_manager_path(entry[:id], permanent: true) } do %>
|
|
<%= fa_icon 'trash' %> <%= t("file_manager.delete_permanently") %>
|
|
<% end %>
|
|
<% end %>
|
|
</td>
|
|
<% end %>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
</section>
|
|
<div class="bottomnav clearfix">
|
|
<%= content_tag(:div, paginate(@trashes), class: "pagination pagination-centered") %>
|
|
<div class="pull-right">
|
|
<% if @thread %>
|
|
<button class="show_progress btn btn-primary" type="button"><%= t("file_manager.show_progress") %></button>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
<script>
|
|
window.is_recycle_bin = true;
|
|
</script>
|
|
<script>
|
|
$(document).ready(function(){
|
|
if($("#threadModal").data('id')){
|
|
$("#threadModal").modal("show");
|
|
$(".show_progress").click(function(){
|
|
$("#threadModal").modal("show");
|
|
})
|
|
}
|
|
})
|
|
</script> |