diff --git a/app/views/dmsf/_multi_upload.html.erb b/app/views/dmsf/_multi_upload.html.erb new file mode 100644 index 00000000..b650e92c --- /dev/null +++ b/app/views/dmsf/_multi_upload.html.erb @@ -0,0 +1,128 @@ +
+ <% 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 %> +
+ +<% 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 %> diff --git a/app/views/dmsf/index.html.erb b/app/views/dmsf/index.html.erb index 3adb0a34..76e7541f 100644 --- a/app/views/dmsf/index.html.erb +++ b/app/views/dmsf/index.html.erb @@ -85,7 +85,7 @@ form_tag({:action => "entries_operation", :id => @project, :folder_id => @folder {: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) %>

+
<%= h(file.display_name) %>
<%= number_to_human_size(file.last_revision.size) unless file.last_revision.nil? %> @@ -93,10 +93,10 @@ form_tag({:action => "entries_operation", :id => @project, :folder_id => @folder <% 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) %> + :title => l(:title_locked_by_user, :user => file.locks[0].user.to_s)) %> <% else if file.locked? %> - <%= image_tag("lockedbycurrent.png", :title => "Locked by you", + <%= image_tag("lockedbycurrent.png", :title => l(:title_locked_by_you), :plugin => "redmine_dmsf") %> <% end %> <% end %> @@ -104,9 +104,9 @@ form_tag({:action => "entries_operation", :id => @project, :folder_id => @folder <%= 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", + when 1 then %><%= image_tag("waitingforapproval.png", :title => l(:title_waiting_for_approval), :plugin => "redmine_dmsf") %> - <% when 2 then %><%= image_tag("approved.png", :title => "Approved", + <% when 2 then %><%= image_tag("approved.png", :title => l(:title_approved), :plugin => "redmine_dmsf") %> <% end %> @@ -121,28 +121,28 @@ form_tag({:action => "entries_operation", :id => @project, :folder_id => @folder <% 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") %> + :title => l(:title_unlock_file)) %> <% 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") %> + :title => l(:title_lock_file)) %> <% 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") %> + :file_id => file}, :class => "delete-link", :title => l(: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") %> + :file_id => file}, :title => l(: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") %> + :file_id => file}, :title => l(:title_notifications_not_active_activate)) %> <% end %> <% end %>
@@ -152,68 +152,22 @@ form_tag({:action => "entries_operation", :id => @project, :folder_id => @folder
- <%= submit_tag("Download", :title => "Download checked in zip archive", :name => "download_entries") %> + <%= submit_tag(l(:submit_download), :title => l(:title_download_checked), :name => "download_entries") %> - <%= submit_tag("Email", :title => "Send checked by email", :name => "email_entries") %> + <%= submit_tag(l(:submit_email), :title => l(: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 => "multi_upload") %>
-<%= render(:partial => 'user_pref') %> +<%= 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 %> \ No newline at end of file diff --git a/config/locales/cs.yml b/config/locales/cs.yml index fe7285fb..7517cd94 100644 --- a/config/locales/cs.yml +++ b/config/locales/cs.yml @@ -49,4 +49,16 @@ cs: :title_notifications_active_deactivate: "Notifications active: Deactivate" :title_notifications_not_active_activate: "Notifications not active: Activate" :title_title_version_version_download: "%{title} version %{version} download" + + :title_locked_by_user: "Locked by %{user}" + :title_locked_by_you: "Locked by you" + :title_waiting_for_approval: "Waiting for Approval" + :title_approved: "Approved" + :title_unlock_file: "Unlock to allow changes for other members" + :title_lock_file: "Lock to prevent changes for other members" + :submit_download: "Download" + :title_download_checked: "Download checked in Zip archive" + :submit_email: "Email" + :title_send_checked_by_email: "Send checked by email" + \ No newline at end of file diff --git a/config/locales/de.yml b/config/locales/de.yml index 86e81b61..22980c79 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -49,4 +49,14 @@ de: :title_notifications_active_deactivate: "Notifications active: Deactivate" :title_notifications_not_active_activate: "Notifications not active: Activate" :title_title_version_version_download: "%{title} version %{version} download" + :title_locked_by_user: "Locked by %{user}" + :title_locked_by_you: "Locked by you" + :title_waiting_for_approval: "Waiting for Approval" + :title_approved: "Approved" + :title_unlock_file: "Unlock to allow changes for other members" + :title_lock_file: "Lock to prevent changes for other members" + :submit_download: "Download" + :title_download_checked: "Download checked in Zip archive" + :submit_email: "Email" + :title_send_checked_by_email: "Send checked by email" \ No newline at end of file diff --git a/config/locales/en-GB.yml b/config/locales/en-GB.yml index 371e86a8..4c04a595 100644 --- a/config/locales/en-GB.yml +++ b/config/locales/en-GB.yml @@ -49,4 +49,14 @@ en-GB: :title_notifications_active_deactivate: "Notifications active: Deactivate" :title_notifications_not_active_activate: "Notifications not active: Activate" :title_title_version_version_download: "%{title} version %{version} download" + :title_locked_by_user: "Locked by %{user}" + :title_locked_by_you: "Locked by you" + :title_waiting_for_approval: "Waiting for Approval" + :title_approved: "Approved" + :title_unlock_file: "Unlock to allow changes for other members" + :title_lock_file: "Lock to prevent changes for other members" + :submit_download: "Download" + :title_download_checked: "Download checked in Zip archive" + :submit_email: "Email" + :title_send_checked_by_email: "Send checked by email" \ No newline at end of file diff --git a/config/locales/en.yml b/config/locales/en.yml index de47a3bc..582da0a0 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -49,4 +49,13 @@ en: :title_notifications_active_deactivate: "Notifications active: Deactivate" :title_notifications_not_active_activate: "Notifications not active: Activate" :title_title_version_version_download: "%{title} version %{version} download" - \ No newline at end of file + :title_locked_by_user: "Locked by %{user}" + :title_locked_by_you: "Locked by you" + :title_waiting_for_approval: "Waiting for Approval" + :title_approved: "Approved" + :title_unlock_file: "Unlock to allow changes for other members" + :title_lock_file: "Lock to prevent changes for other members" + :submit_download: "Download" + :title_download_checked: "Download checked in Zip archive" + :submit_email: "Email" + :title_send_checked_by_email: "Send checked by email" \ No newline at end of file diff --git a/config/locales/es.yml b/config/locales/es.yml index 13eff156..d3434e77 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -49,4 +49,14 @@ es: :title_notifications_active_deactivate: "Notifications active: Deactivate" :title_notifications_not_active_activate: "Notifications not active: Activate" :title_title_version_version_download: "%{title} version %{version} download" + :title_locked_by_user: "Locked by %{user}" + :title_locked_by_you: "Locked by you" + :title_waiting_for_approval: "Waiting for Approval" + :title_approved: "Approved" + :title_unlock_file: "Unlock to allow changes for other members" + :title_lock_file: "Lock to prevent changes for other members" + :submit_download: "Download" + :title_download_checked: "Download checked in Zip archive" + :submit_email: "Email" + :title_send_checked_by_email: "Send checked by email" \ No newline at end of file diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 7e1af875..1f9fc2d5 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -49,4 +49,14 @@ fr: :title_notifications_active_deactivate: "Notifications active: Deactivate" :title_notifications_not_active_activate: "Notifications not active: Activate" :title_title_version_version_download: "%{title} version %{version} download" + :title_locked_by_user: "Locked by %{user}" + :title_locked_by_you: "Locked by you" + :title_waiting_for_approval: "Waiting for Approval" + :title_approved: "Approved" + :title_unlock_file: "Unlock to allow changes for other members" + :title_lock_file: "Lock to prevent changes for other members" + :submit_download: "Download" + :title_download_checked: "Download checked in Zip archive" + :submit_email: "Email" + :title_send_checked_by_email: "Send checked by email" \ No newline at end of file diff --git a/config/locales/ru.yml b/config/locales/ru.yml index 1ee78e93..98f6e166 100644 --- a/config/locales/ru.yml +++ b/config/locales/ru.yml @@ -49,4 +49,14 @@ ru: :title_notifications_active_deactivate: "Notifications active: Deactivate" :title_notifications_not_active_activate: "Notifications not active: Activate" :title_title_version_version_download: "%{title} version %{version} download" + :title_locked_by_user: "Locked by %{user}" + :title_locked_by_you: "Locked by you" + :title_waiting_for_approval: "Waiting for Approval" + :title_approved: "Approved" + :title_unlock_file: "Unlock to allow changes for other members" + :title_lock_file: "Lock to prevent changes for other members" + :submit_download: "Download" + :title_download_checked: "Download checked in Zip archive" + :submit_email: "Email" + :title_send_checked_by_email: "Send checked by email" \ No newline at end of file