<% # encoding: utf-8 # # Redmine plugin for Document Management System "Features" # # Copyright © 2011 Vít Jonáš # Copyright © 2012 Daniel Munn # Copyright © 2011-20 Karel Pičman # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. %>

<%= l(:label_upload) %>

<%= form_tag({:controller => 'dmsf_upload', :action => 'upload_files', :id => @project, :folder_id => @folder}, :id => 'uploadform', :method => :post, :multipart => true) do %>
<%= render :partial => 'dmsf_upload/form', :locals => { :multiple => true, :container => nil, :description => true, :awf => false } %> <%= submit_tag l(:label_upload) %>
<% end %> <% form_url = url_for({:controller => 'dmsf_upload', :action => 'upload_file', :id => @project}) max_file_size = "#{@ajax_upload_size}mb" max_file_count = Setting.plugin_redmine_dmsf['dmsf_max_file_upload'].to_i if Setting.plugin_redmine_dmsf['dmsf_max_file_upload'].to_i > 0 flash_url = plugin_asset_path(:redmine_dmsf, 'javascripts', 'plupload/js/Moxie.swf') %> <%= late_javascript_tag do %> var originalUploaderContent; var uploader = $('#dmsf_uploader'); originalUploaderContent = uploader.html(); $('#uploader_select').change(function() { if($(this).val() === '2') { uploader.html(originalUploaderContent); dmsfSetupFileDrop(); } else { initPlUploader( uploader, '<%= form_url %>', '<%= max_file_size %>', '<%= max_file_count %>', '<%= flash_url %>' ); } }); initPlUploader( uploader, '<%= form_url %>', '<%= max_file_size %>', '<%= max_file_count %>', '<%= flash_url %>' ); window.dmsfFileFieldCount = 1; <% end %> <% content_for :header_tags do %> <%= stylesheet_link_tag 'plupload/jquery.ui.plupload.css', :plugin => :redmine_dmsf %> <%= javascript_include_tag 'plupload/js/plupload.full.min.js', :plugin => :redmine_dmsf, defer: true %> <%= javascript_include_tag 'plupload/js/jquery.ui.plupload/jquery.ui.plupload.js', :plugin => :redmine_dmsf, defer: true %> <%= javascript_include_tag(js_url, :plugin => :redmine_dmsf, defer: true) %> <% end %>