diff --git a/app/views/dmsf/_multi_upload.html.erb b/app/views/dmsf/_multi_upload.html.erb index 79157aee..792e8416 100644 --- a/app/views/dmsf/_multi_upload.html.erb +++ b/app/views/dmsf/_multi_upload.html.erb @@ -22,7 +22,15 @@ :id => 'uploadform', :method=>:post, :multipart => true) do %> <% if Setting.attachment_max_size.to_i >= 102400 %>
+ <%= content_tag(:label, "#{l(:label_maximum_ajax_upload_filesize)}:") %>
+ <%= text_field_tag 'settings[dmsf_max_ajax_upload_filesize]', @settings['dmsf_max_ajax_upload_filesize'], :size => 10 %>
+ (<%= l(:label_default) %>: 100)
+
+ <%= l(:note_maximum_ajax_upload_filesize) %>
+
<%= content_tag(:label, "#{l(:label_file_storage_directory)}:") %> <% diff --git a/config/locales/cs.yml b/config/locales/cs.yml index 25d5364b..ff2c9f5d 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -279,4 +279,7 @@ cs: my: blocks: locked_documents: Zamčené dokumenty - open_approvals: Procesy ke schválení \ No newline at end of file + open_approvals: Procesy ke schválení + + label_maximum_ajax_upload_filesize: Maximální velikost souboru nahratelná přes AJAX + note_maximum_ajax_upload_filesize: Omezuje velikost souboru, který může být nahrán přes standardní rozhraní AJAX, jinak se použije standarní rozhraní Redminu. Číslo je MB. \ No newline at end of file diff --git a/config/locales/de.yml b/config/locales/de.yml index 70989add..1a100e01 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -281,4 +281,7 @@ de: my: blocks: locked_documents: Locked documents - open_approvals: Open approvals \ No newline at end of file + open_approvals: Open approvals + + label_maximum_ajax_upload_filesize: Maximum file size uploadable via AJAX + note_maximum_ajax_upload_filesize: Limits maximum file size that can uploaded via standard AJAX interface otherwise Redmine standard upload form must be used. Number is in MB. \ No newline at end of file diff --git a/config/locales/en.yml b/config/locales/en.yml index e3cca781..1bc99d72 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -283,3 +283,6 @@ en: blocks: locked_documents: Locked documents openap_provals: Open approvals + + label_maximum_ajax_upload_filesize: Maximum file size uploadable via AJAX + note_maximum_ajax_upload_filesize: Limits maximum file size that can uploaded via standard AJAX interface otherwise Redmine standard upload form must be used. Number is in MB. diff --git a/config/locales/es.yml b/config/locales/es.yml index 5b114044..751317ee 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -280,4 +280,8 @@ es: my: blocks: locked_documents: Locked documents - open_approvals: Open approvals \ No newline at end of file + open_approvals: Open approvals + + + label_maximum_ajax_upload_filesize: Maximum file size uploadable via AJAX + note_maximum_ajax_upload_filesize: Limits maximum file size that can uploaded via standard AJAX interface otherwise Redmine standard upload form must be used. Number is in MB. \ No newline at end of file diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 145120b8..efc6bb9c 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -280,4 +280,7 @@ fr: my: blocks: locked_documents: Locked documents - open_approvals: Open approvals \ No newline at end of file + open_approvals: Open approvals + + label_maximum_ajax_upload_filesize: Maximum file size uploadable via AJAX + note_maximum_ajax_upload_filesize: Limits maximum file size that can uploaded via standard AJAX interface otherwise Redmine standard upload form must be used. Number is in MB. \ No newline at end of file diff --git a/config/locales/ja.yml b/config/locales/ja.yml index d1b4e3a7..9388eaad 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -280,4 +280,7 @@ ja: my: blocks: locked_documents: Locked documents - open_approvals: Open approvals \ No newline at end of file + open_approvals: Open approvals + + label_maximum_ajax_upload_filesize: Maximum file size uploadable via AJAX + note_maximum_ajax_upload_filesize: Limits maximum file size that can uploaded via standard AJAX interface otherwise Redmine standard upload form must be used. Number is in MB. \ No newline at end of file diff --git a/config/locales/ru.yml b/config/locales/ru.yml index ea4ff936..beb9a84c 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -280,4 +280,7 @@ ru: my: blocks: locked_documents: Locked documents - open_approvals: Open approvals \ No newline at end of file + open_approvals: Open approvals + + label_maximum_ajax_upload_filesize: Maximum file size uploadable via AJAX + note_maximum_ajax_upload_filesize: Limits maximum file size that can uploaded via standard AJAX interface otherwise Redmine standard upload form must be used. Number is in MB. \ No newline at end of file diff --git a/config/locales/sl.yml b/config/locales/sl.yml index 622de861..c5845b00 100644 --- a/config/locales/sl.yml +++ b/config/locales/sl.yml @@ -280,4 +280,7 @@ sl: my: blocks: locked_documents: Locked documents - open_approvals: Open approvals \ No newline at end of file + open_approvals: Open approvals + + label_maximum_ajax_upload_filesize: Maximum file size uploadable via AJAX + note_maximum_ajax_upload_filesize: Limits maximum file size that can uploaded via standard AJAX interface otherwise Redmine standard upload form must be used. Number is in MB. \ No newline at end of file diff --git a/config/locales/zh.yml b/config/locales/zh.yml index c5d7f675..ef2d9fc7 100644 --- a/config/locales/zh.yml +++ b/config/locales/zh.yml @@ -281,4 +281,7 @@ zh: my: blocks: locked_documents: Locked documents - open_approvals: Open approvals \ No newline at end of file + open_approvals: Open approvals + + label_maximum_ajax_upload_filesize: Maximum file size uploadable via AJAX + note_maximum_ajax_upload_filesize: Limits maximum file size that can uploaded via standard AJAX interface otherwise Redmine standard upload form must be used. Number is in MB. \ No newline at end of file diff --git a/init.rb b/init.rb index c72aff3b..6fe61a45 100644 --- a/init.rb +++ b/init.rb @@ -33,16 +33,17 @@ Redmine::Plugin.register :redmine_dmsf do requires_redmine :version_or_higher => '2.3.0' settings :partial => 'settings/dmsf_settings', - :default => { - 'dmsf_max_file_upload' => '0', - 'dmsf_max_file_download' => '0', - 'dmsf_max_email_filesize' => '0', - 'dmsf_storage_directory' => Rails.root.join('files/dmsf').to_s, - 'dmsf_index_database' => Rails.root.join('files/dmsf_index').to_s, - 'dmsf_stemming_lang' => 'english', - 'dmsf_stemming_strategy' => 'STEM_NONE', - 'dmsf_webdav' => '1' - } + :default => { + 'dmsf_max_file_upload' => '0', + 'dmsf_max_file_download' => '0', + 'dmsf_max_email_filesize' => '0', + 'dmsf_max_ajax_upload_filesize' => '100', + 'dmsf_storage_directory' => Rails.root.join('files/dmsf').to_s, + 'dmsf_index_database' => Rails.root.join('files/dmsf_index').to_s, + 'dmsf_stemming_lang' => 'english', + 'dmsf_stemming_strategy' => 'STEM_NONE', + 'dmsf_webdav' => '1' + } menu :project_menu, :dmsf, { :controller => 'dmsf', :action => 'show' }, :caption => :menu_dmsf, :before => :documents, :param => :id