<% html_title("DMSF") %>
<% if User.current.allowed_to?(:folder_manipulation, @project) %> <% unless @folder.nil? %> <%= link_to(image_tag("filedetails.png", :plugin => "redmine_dmsf", :style => "vertical-align: text-top;"), {:controller => "dmsf_detail", :action => "folder_detail", :id => @project, :folder_id => @folder }, :title => l(:link_details, :title => h(@folder.name))) %> | <% end %> <% form_for(DmsfFolder.new, :url => {:controller => "dmsf_detail", :action => "create_folder", :id => @project, :folder_id => @folder}, :html => {:method=>:post}) do |f| %> Title: <%= f.text_field(:name) %><%= f.submit(l(:submit_create_folder)) %> <% end %> <% end %>
<% path = @folder.nil? ? [] : @folder.dmsf_path %>

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

<%= textilizable(@folder.description) unless @folder.nil? %>
<% form_tag({:action => "entries_operation", :id => @project, :folder_id => @folder}, :method => :post, :class => "dmfs_entries", :id => "Entries") do %> <%= hidden_field_tag("action") %> <%= sort_header_tag("title", :caption => l(:link_title), :style => "width: 50%") %> <%= 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.name), {:action => "index", :folder_id => subfolder}, :class => "icon icon-folder") %> - - - -
<% if User.current.allowed_to?(:folder_manipulation, @project) %> <%= link_to(image_tag("delete.png", :plugin => "redmine_dmsf"), {:controller => "dmsf_detail", :action => "delete_folder", :id => @project, :folder_id => @folder, :delete_folder_id => subfolder}, :class => "delete-link", :title => l(:title_delete)) %> <% end %> <% if User.current.allowed_to?(:file_approval, @project) %> <% if subfolder.notification %> <%= link_to(image_tag("notify.png", :plugin => "redmine_dmsf"), {:controller => "dmsf_state", :action => "folder_notify_deactivate", :id => @project, :folder_id => subfolder}, :title => l(:title_notifications_active_deactivate)) %> <% else %> <%= link_to(image_tag("notifynot.png", :plugin => "redmine_dmsf"), {:controller => "dmsf_state", :action => "folder_notify_activate", :id => @project, :folder_id => subfolder}, :title => l(:title_notifications_not_active_activate)) %> <% end %> <% end %>

<%= check_box_tag("files[]", file.id, false, :title => l(:title_check_for_zip_download_or_email)) %> <%= link_to(h(file.last_revision.display_title), {:action => "download_file", :id => @project, :file_id => file}, :class => "icon icon-file #{Redmine::MimeType.css_class_of(file.name)}", :title => l(:title_title_version_version_download, :title => h(file.last_revision.title), :version => file.last_revision.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 => "Locked by " + file.locks[0].user.to_s) %> <% else if file.locked? %> <%= image_tag("lockedbycurrent.png", :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 => "Waiting for Approval", :plugin => "redmine_dmsf") %> <% when 2 then %><%= image_tag("approved.png", :title => "Approved", :plugin => "redmine_dmsf") %> <% end %> <%= h(file.last_revision.user) unless file.last_revision.nil? %>
<%= link_to(image_tag("filedetails.png", :plugin => "redmine_dmsf"), {:controller => "dmsf_detail", :action => "file_detail", :id => @project, :file_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_state", :action => "unlock_file", :id => @project, :file_id => file }, :title => "Unlock to allow changes for other members") %> <% else %> <%= link_to(image_tag("lock.png", :plugin => "redmine_dmsf"), {:controller => "dmsf_state", :action => "lock_file", :id => @project, :file_id => file }, :title => "Lock to prevent changes for other members") %> <% end %>   <% end %> <% if User.current.allowed_to?(:file_manipulation, @project) %> <%= link_to(image_tag("delete.png", :plugin => "redmine_dmsf"), {:controller => "dmsf_detail", :action => "delete_file", :id => @project, :file_id => file}, :class => "delete-link", :title => "Delete") %> <% end %> <% if User.current.allowed_to?(:file_approval, @project) %> <% if file.notification %> <%= link_to(image_tag("notify.png", :plugin => "redmine_dmsf"), {:controller => "dmsf_state", :action => "file_notify_deactivate", :id => @project, :file_id => file}, :title => "Notifications active: Deactivate") %> <% else %> <%= link_to(image_tag("notifynot.png", :plugin => "redmine_dmsf"), {:controller => "dmsf_state", :action => "file_notify_activate", :id => @project, :file_id => file}, :title => "Notifications not active: Activate") %> <% end %> <% end %>

<%= submit_tag("Download", :title => "Download checked in zip archive", :name => "download_entries") %> <%= submit_tag("Email", :title => "Send checked by email", :name => "email_entries") %>

<% end %>
<% form_tag({:controller => "dmsf_detail", :action => "upload_files", :id => @project, :folder_id => @folder}, :id => "uploadform", :method=>:post, :multipart => true) do %> <% if Setting.attachment_max_size.to_i >= 102400 %>
File size:
<% end %>

File Upload

<% if Setting.plugin_redmine_dmsf["dmsf_max_file_upload"].to_i > 0 %>There can be uploaded maximum of <%= Setting.plugin_redmine_dmsf["dmsf_max_file_upload"].to_i %> files at once.<% end %> <% if Setting.attachment_max_size.to_i >= 2097151 %>To upload files greater than 2GB you must have 64b browser.<% end %>

<%= file_field_tag("uploaded_files[1]", :size => 30, :id => nil) %>
<%= link_to(l(:label_add_another_file), "#", :onclick => "dmsfAddFileField(); return false;" ) %> (<%= l(:label_max_size) %>: <%= number_to_human_size(Setting.attachment_max_size.to_i.kilobytes) %>)

<%= submit_tag("Upload") %>
<% end %>

<%= render(:partial => 'user_pref') %> <% 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" %> <%= javascript_include_tag "https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/jquery-ui.min.js" %> <%= javascript_include_tag "plupload/plupload.js", :plugin => "redmine_dmsf" %> <%= javascript_include_tag "plupload/plupload.flash.js", :plugin => "redmine_dmsf" %> <%= javascript_include_tag "plupload/plupload.gears.js", :plugin => "redmine_dmsf" %> <%= javascript_include_tag "plupload/plupload.html5.js", :plugin => "redmine_dmsf" %> <%= javascript_include_tag "plupload/plupload.html4.js", :plugin => "redmine_dmsf" %> <%= javascript_include_tag "plupload/jquery.ui.plupload/jquery.ui.plupload.js", :plugin => "redmine_dmsf" %> <% if I18n.locale && !I18n.locale.to_s.match(/^en.*/) %> <%= javascript_include_tag "plupload/i18n/#{I18n.locale.to_s.downcase}.js", :plugin => "redmine_dmsf" %> <% end %> <% end %>