summaryrefslogtreecommitdiffstats
path: root/app/helpers/application_helper.rb
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2024-11-29 07:58:59 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2024-11-29 07:58:59 +0000
commit018d89bf8ac3b0f6d9f545a0aeb8cc5c3bbec56e (patch)
tree9fb8a2c0b10a0e5c59901b7cdef20cb8ef5da7b6 /app/helpers/application_helper.rb
parentd63678068a2e31dcd9930c0f96e07dc2dcb78b6b (diff)
downloadredmine-018d89bf8ac3b0f6d9f545a0aeb8cc5c3bbec56e.tar.gz
redmine-018d89bf8ac3b0f6d9f545a0aeb8cc5c3bbec56e.zip
Fixes that group icons in Watchers box have both the old and the new icon style (#41853).
git-svn-id: https://svn.redmine.org/redmine/trunk@23328 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r--app/helpers/application_helper.rb17
1 files changed, 6 insertions, 11 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index bac8da266..4aa233851 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -651,17 +651,12 @@ module ApplicationHelper
def principals_check_box_tags(name, principals)
s = +''
principals.each do |principal|
- s <<
- content_tag(
- 'label',
- check_box_tag(name, principal.id, false, :id => nil) +
- (avatar(principal, :size => 16).presence ||
- content_tag(
- 'span', principal_icon(principal),
- :class => "name icon icon-#{principal.class.name.downcase}"
- )
- ) + principal.to_s
- )
+ principal_check_box = +''
+ principal_check_box << check_box_tag(name, principal.id, false, :id => nil)
+ principal_check_box << avatar(principal, :size => 16).to_s if principal.is_a?(User)
+ principal_check_box << content_tag('span', principal_icon(principal), :class => "name icon icon-#{principal.class.to_s.downcase}")
+ principal_check_box << principal.to_s
+ s << content_tag('label', principal_check_box.html_safe)
end
s.html_safe
end