<% html_title(l(:dmsf)) %>
<% if User.current.allowed_to?(:folder_manipulation, @project) %> <% if @folder.nil? %> <%= link_to("", {:action => "edit_root", :id => @project}, :title => l(:link_edit, :title => l(:link_documents)), :class => "icon icon-edit") %>   <% else @folder.nil? %> <%= link_to("", {:action => "edit", :id => @project, :folder_id => @folder }, :title => l(:link_edit, :title => h(@folder.title)), :class => "icon icon-edit") %>   <% end %> <%= link_to("", {:action => "new", :id => @project, :parent_id => @folder }, :title => l(:link_create_folder), :class => "icon icon-add") %> <% end %>
<% path = @folder.nil? ? [] : @folder.dmsf_path %>

<%= render(:partial => 'path', :locals => {:path => path}) %>

<%= textilizable(@folder.nil? ? @project.dmsf_description : @folder.description) %>
<% form_tag({:action => "entries_operation", :id => @project, :folder_id => @folder}, :method => :post, :class => "dmfs_entries", :id => "entries_form") do %> <%= hidden_field_tag("action") %> <%= sort_header_tag("title", :caption => l(:link_title)) %> <%= sort_header_tag("size", :caption => l(:link_size)) %> <%= sort_header_tag("modified", :caption => l(:link_modified)) %> <%= sort_header_tag("version", :caption => l(:link_ver)) %> <%= sort_header_tag("author", :caption => l(:link_author)) %> <% @subfolders.each do |subfolder| %> <% end %> <% @files.each do |file| %> <% end %>
<%= check_box_tag("subfolders[]", subfolder.id, false, :title => l(:title_check_for_zip_download_or_email)) %> <%= link_to(h(subfolder.title), {:action => "show", :id => @project, :folder_id => subfolder}, :class => "icon icon-folder") %>
[<%= subfolder.files.count %>]
- - - - <% if User.current.allowed_to?(:file_approval, @project) %>
<% if subfolder.notification %> <%= link_to(image_tag("notify.png", :plugin => "redmine_dmsf"), {:action => "notify_deactivate", :id => @project, :folder_id => subfolder}, :title => l(:title_notifications_active_deactivate)) %> <% else %> <%= link_to(image_tag("notifynot.png", :plugin => "redmine_dmsf"), {:action => "notify_activate", :id => @project, :folder_id => subfolder}, :title => l(:title_notifications_not_active_activate)) %> <% end %>
<% end %>
<% if User.current.allowed_to?(:folder_manipulation, @project) %>
<%= link_to(image_tag("edit.png", :class =>"detail_icon"), {:action => "edit", :id => @project, :folder_id => subfolder }, :title => l(:link_edit, :title => h(subfolder.title))) %>
<% end %>
<%= link_to(image_tag("delete.png", :plugin => "redmine_dmsf"), {:action => "delete", :id => @project, :folder_id => @folder, :delete_folder_id => subfolder}, :class => "delete-link", :title => l(:title_delete)) if User.current.allowed_to?(:folder_manipulation, @project) %>

<%= check_box_tag("files[]", file.id, false, :title => l(:title_check_for_zip_download_or_email)) %> <%= link_to(h(file.last_revision.display_title), {:controller => :dmsf_files, :action => "show", :id => file, :download => ""}, :class => "icon icon-file #{DmsfHelper.filetype_css(file.name)}", :title => l(:title_title_version_version_download, :title => h(file.title), :version => file.version)) %>
<%= h(file.display_name) %>
<%= number_to_human_size(file.last_revision.size) unless file.last_revision.nil? %> <%= file.last_revision.updated_at.strftime("%Y-%m-%d %H:%M") unless file.last_revision.nil? %> <% if file.locked_for_user? %> <%= link_to(image_tag("locked.png", :plugin => "redmine_dmsf"), {:controller => "users", :action => "show", :id => file.locks[0].user }, :title => l(:title_locked_by_user, :user => file.locks[0].user.to_s)) %> <% else if file.locked? %> <%= image_tag("lockedbycurrent.png", :title => l(:title_locked_by_you), :plugin => "redmine_dmsf") %> <% end %> <% end %> <%= file.last_revision.version unless file.last_revision.nil? %> <% case file.last_revision.workflow when 1 then %><%= image_tag("waitingforapproval.png", :title => l(:title_waiting_for_approval), :plugin => "redmine_dmsf") %> <% when 2 then %><%= image_tag("approved.png", :title => l(:title_approved), :plugin => "redmine_dmsf") %> <% end %> <%= h(file.last_revision.user) unless file.last_revision.nil? %> <% if User.current.allowed_to?(:file_approval, @project) %>
<% if file.notification %> <%= link_to(image_tag("notify.png", :plugin => "redmine_dmsf"), {:controller => "dmsf_files", :action => "notify_deactivate", :id => file}, :title => l(:title_notifications_active_deactivate)) %> <% else %> <%= link_to(image_tag("notifynot.png", :plugin => "redmine_dmsf"), {:controller => "dmsf_files", :action => "notify_activate", :id => file}, :title => l(:title_notifications_not_active_activate)) %> <% end %>
<% end %>
<%= link_to(image_tag("filedetails.png", :plugin => "redmine_dmsf", :class =>"detail_icon"), {:controller => "dmsf_files", :action => :show, :id => file }, :title => l(:link_details, :title =>h(file.last_revision.title))) %>
<% unless file.locked_for_user? && !User.current.allowed_to?(:force_file_unlock, @project)%> <% if file.locked? %> <%= link_to(image_tag("unlock.png", :plugin => "redmine_dmsf"), {:controller => "dmsf_files", :action => "unlock", :id => file }, :title => l(:title_unlock_file)) %> <% else %> <%= link_to(image_tag("lock.png", :plugin => "redmine_dmsf"), {:controller => "dmsf_files", :action => "lock", :id => file }, :title => l(:title_lock_file)) %> <% end %>   <% end %> <% if User.current.allowed_to?(:file_manipulation, @project) && !file.locked_for_user? %> <%= link_to(image_tag("delete.png", :plugin => "redmine_dmsf"), {:controller => "dmsf_files", :action => "delete", :id => file}, :class => "delete-link", :title => l(:title_delete)) %> <% end %>

<%= submit_tag(l(:submit_download), :title => l(:title_download_checked), :name => "download_entries") %> <%= submit_tag(l(:submit_email), :title => l(:title_send_checked_by_email), :name => "email_entries") %> <% if User.current.allowed_to?(:file_manipulation, @project) %> <% end %>
<%= l(:label_number_of_folders)%>: <%= @subfolders.count %>, <%= l(:label_number_of_files)%>: <%= @files.count %>

<% end %> <% content_for :header_tags do %> <%= stylesheet_link_tag "https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/themes/base/jquery-ui.css" %> <%= stylesheet_link_tag "plupload/jquery.ui.plupload.css", :plugin => "redmine_dmsf" %> <%= stylesheet_link_tag "dmsf", :plugin => "redmine_dmsf" %> <%= javascript_include_tag "https://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js" %> <% end %> <%= render(:partial => "multi_upload") if User.current.allowed_to?(:file_manipulation, @project) %>
<% content_for :header_tags do %> <% end %>