diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/plugins/gravatar/lib/gravatar.rb | 2 | ||||
-rw-r--r-- | lib/redmine/field_format.rb | 4 | ||||
-rw-r--r-- | lib/redmine/reaction.rb | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/plugins/gravatar/lib/gravatar.rb b/lib/plugins/gravatar/lib/gravatar.rb index 4dc27db52..316a01b19 100644 --- a/lib/plugins/gravatar/lib/gravatar.rb +++ b/lib/plugins/gravatar/lib/gravatar.rb @@ -69,7 +69,7 @@ module GravatarHelper options[:default] = CGI::escape(options[:default]) unless options[:default].nil? gravatar_api_url(email_hash).tap do |url| opts = [] - [:rating, :size, :default].each do |opt| + [:rating, :size, :default, :initials].each do |opt| unless options[opt].nil? value = h(options[opt]) opts << [opt, value].join('=') diff --git a/lib/redmine/field_format.rb b/lib/redmine/field_format.rb index 3e87eeb38..39b21c874 100644 --- a/lib/redmine/field_format.rb +++ b/lib/redmine/field_format.rb @@ -1145,11 +1145,11 @@ module Redmine end def formatted_value(view, custom_field, value, customized=nil, html=false) - text = "#{value}%" if html + text = "#{value}%" view.progress_bar(value.to_i, legend: (text if view.action_name == 'show')) else - text + value.to_s end end end diff --git a/lib/redmine/reaction.rb b/lib/redmine/reaction.rb index b6f2bf075..09fb78ef8 100644 --- a/lib/redmine/reaction.rb +++ b/lib/redmine/reaction.rb @@ -22,13 +22,13 @@ module Redmine # Types of objects that can have reactions REACTABLE_TYPES = %w(Journal Issue Message News Comment) - # Returns true if the user can view the reaction information of the object + # Returns true if the user can view the reaction of the object def self.visible?(object, user = User.current) Setting.reactions_enabled? && object.visible?(user) end # Returns true if the user can add/remove a reaction to/from the object - def self.writable?(object, user = User.current) + def self.editable?(object, user = User.current) user.logged? && visible?(object, user) && object&.project&.active? end |