h in model
This commit is contained in:
parent
7f5b0b85a7
commit
b687119d1d
3
Gemfile
3
Gemfile
@ -22,7 +22,6 @@
|
||||
|
||||
source 'https://rubygems.org' do
|
||||
gem 'zip-zip'
|
||||
gem 'simple_enum'
|
||||
gem 'uuidtools'
|
||||
gem 'dalli'
|
||||
gem 'active_record_union'
|
||||
@ -30,6 +29,8 @@ source 'https://rubygems.org' do
|
||||
# Redmine extensions
|
||||
unless %w(easyproject easy_gantt).any? { |plugin| Dir.exist?(File.expand_path("../../#{plugin}", __FILE__)) }
|
||||
gem 'redmine_extensions', '~> 0.3.9'
|
||||
gem 'simple_enum'
|
||||
|
||||
|
||||
group :test do
|
||||
gem 'rails-controller-testing'
|
||||
|
||||
@ -40,7 +40,7 @@ def dmsf_init
|
||||
# Main menu extension
|
||||
Redmine::MenuManager.map :top_menu do |menu|
|
||||
menu.push :dmsf, { controller: 'dmsf', action: 'index' }, caption: :menu_dmsf,
|
||||
html: { class: 'icon-dmsf' },
|
||||
html: { class: 'icon-dmsf', category: :rest_extension_modules},
|
||||
if: Proc.new { User.current.allowed_to?(:view_dmsf_folders, nil, global: true) }
|
||||
end
|
||||
|
||||
|
||||
@ -221,11 +221,12 @@ class DmsfWorkflow < ActiveRecord::Base
|
||||
:text_email_to_proceed,
|
||||
nil,
|
||||
assignments.first&.dmsf_workflow_step)
|
||||
if Setting.plugin_redmine_dmsf['dmsf_display_notified_recipients']
|
||||
if Setting.plugin_redmine_dmsf['dmsf_display_notified_recipients'] && controller
|
||||
unless recipients.blank?
|
||||
to = recipients.collect{ |r| h(r.name) }.first(DMSF_MAX_NOTIFICATION_RECEIVERS_INFO).join(', ')
|
||||
to = recipients.collect{ |r| controller.__send__(:h, r.name) }.first(DMSF_MAX_NOTIFICATION_RECEIVERS_INFO).join(
|
||||
', ')
|
||||
to << ((recipients.count > DMSF_MAX_NOTIFICATION_RECEIVERS_INFO) ? ',...' : '.')
|
||||
controller.flash[:warning] = l(:warning_email_notifications, to: to) if controller
|
||||
controller.flash[:warning] = l(:warning_email_notifications, to: to)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user