diff --git a/app/controllers/dmsf_controller.rb b/app/controllers/dmsf_controller.rb index 2a4d491a..96f4d123 100644 --- a/app/controllers/dmsf_controller.rb +++ b/app/controllers/dmsf_controller.rb @@ -640,7 +640,7 @@ class DmsfController < ApplicationController recipients = DmsfMailer.deliver_files_deleted(@project, deleted_files) if Setting.plugin_redmine_dmsf['dmsf_display_notified_recipients'] if recipients.any? - to = recipients.collect{ |r| h(r.name) }.first(DMSF_MAX_NOTIFICATION_RECEIVERS_INFO).join(', ') + to = recipients.collect{ |r| r.name }.first(DMSF_MAX_NOTIFICATION_RECEIVERS_INFO).join(', ') to << ((recipients.count > DMSF_MAX_NOTIFICATION_RECEIVERS_INFO) ? ',...' : '.') flash[:warning] = l(:warning_email_notifications, to: to) end @@ -650,7 +650,7 @@ class DmsfController < ApplicationController end end unless not_deleted_files.empty? - flash[:warning] = l(:warning_some_entries_were_not_deleted, entries: not_deleted_files.map{ |f| h(f.title) }. + flash[:warning] = l(:warning_some_entries_were_not_deleted, entries: not_deleted_files.map{ |f| f.title }. join(', ')) end # Links diff --git a/app/controllers/dmsf_files_controller.rb b/app/controllers/dmsf_files_controller.rb index 28e437fd..0b4d9e2d 100644 --- a/app/controllers/dmsf_files_controller.rb +++ b/app/controllers/dmsf_files_controller.rb @@ -150,7 +150,7 @@ class DmsfFilesController < ApplicationController @file.name = revision.name if revision.save - revision.assign_workflow(params[:dmsf_workflow_id]) + revision.assign_workflow params[:dmsf_workflow_id] if upload begin FileUtils.mv upload.tempfile_path, revision.disk_file(false) @@ -178,7 +178,7 @@ class DmsfFilesController < ApplicationController recipients = DmsfMailer.deliver_files_updated(@project, [@file]) if Setting.plugin_redmine_dmsf['dmsf_display_notified_recipients'] if recipients.any? - to = recipients.collect{ |r| h(r.name) }.first(DMSF_MAX_NOTIFICATION_RECEIVERS_INFO).join(', ') + to = recipients.collect{ |r| r.name }.first(DMSF_MAX_NOTIFICATION_RECEIVERS_INFO).join(', ') to << ((recipients.count > DMSF_MAX_NOTIFICATION_RECEIVERS_INFO) ? ',...' : '.') flash[:warning] = l(:warning_email_notifications, to: to) end @@ -208,7 +208,7 @@ class DmsfFilesController < ApplicationController recipients = DmsfMailer.deliver_files_deleted(@project, [@file]) if Setting.plugin_redmine_dmsf['dmsf_display_notified_recipients'] if recipients.any? - to = recipients.collect{ |r| h(r.name) }.first(DMSF_MAX_NOTIFICATION_RECEIVERS_INFO).join(', ') + to = recipients.collect{ |r| r.name }.first(DMSF_MAX_NOTIFICATION_RECEIVERS_INFO).join(', ') to << ((recipients.count > DMSF_MAX_NOTIFICATION_RECEIVERS_INFO) ? ',...' : '.') flash[:warning] = l(:warning_email_notifications, to: to) end diff --git a/app/controllers/dmsf_workflows_controller.rb b/app/controllers/dmsf_workflows_controller.rb index 9b1ea170..7266d453 100644 --- a/app/controllers/dmsf_workflows_controller.rb +++ b/app/controllers/dmsf_workflows_controller.rb @@ -84,7 +84,7 @@ class DmsfWorkflowsController < ApplicationController :text_email_to_see_history) if Setting.plugin_redmine_dmsf['dmsf_display_notified_recipients'] unless recipients.blank? - to = recipients.collect{ |r| h(r.name) }.first(DMSF_MAX_NOTIFICATION_RECEIVERS_INFO).join(', ') + to = recipients.collect{ |r| r.name }.first(DMSF_MAX_NOTIFICATION_RECEIVERS_INFO).join(', ') to << ((recipients.count > DMSF_MAX_NOTIFICATION_RECEIVERS_INFO) ? ',...' : '.') flash[:warning] = l(:warning_email_notifications, to: to) end @@ -105,7 +105,7 @@ class DmsfWorkflowsController < ApplicationController action.note) if Setting.plugin_redmine_dmsf['dmsf_display_notified_recipients'] unless recipients.blank? - to = recipients.collect{ |r| h(r.name) }.first(DMSF_MAX_NOTIFICATION_RECEIVERS_INFO).join(', ') + to = recipients.collect{ |r| r.name }.first(DMSF_MAX_NOTIFICATION_RECEIVERS_INFO).join(', ') to << ((recipients.count > DMSF_MAX_NOTIFICATION_RECEIVERS_INFO) ? ',...' : '.') flash[:warning] = l(:warning_email_notifications, to: to) end @@ -126,7 +126,7 @@ class DmsfWorkflowsController < ApplicationController action.note, action.dmsf_workflow_step_assignment.dmsf_workflow_step) if Setting.plugin_redmine_dmsf['dmsf_display_notified_recipients'] - flash[:warning] = l(:warning_email_notifications, to: h(delegate.name)) + flash[:warning] = l(:warning_email_notifications, to: delegate.name) end end else @@ -164,7 +164,7 @@ class DmsfWorkflowsController < ApplicationController recipients.uniq! recipients = recipients & DmsfMailer.get_notify_users(@project, [revision.dmsf_file], true) unless recipients.empty? - to = recipients.collect{ |r| h(r.name) }.first(DMSF_MAX_NOTIFICATION_RECEIVERS_INFO).join(', ') + to = recipients.collect{ |r| r.name }.first(DMSF_MAX_NOTIFICATION_RECEIVERS_INFO).join(', ') to << ((recipients.count > DMSF_MAX_NOTIFICATION_RECEIVERS_INFO) ? ',...' : '.') flash[:warning] = l(:warning_email_notifications, to: to) end