summaryrefslogtreecommitdiffstats
path: root/app/helpers/application_helper.rb
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2024-11-30 10:51:51 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2024-11-30 10:51:51 +0000
commit9c5199f5f5d7f5c52f6dce5a5f0ebd707cc30289 (patch)
tree286a27abad5ef26d7a75b77d8118e51271e83f5d /app/helpers/application_helper.rb
parent3086ea3ce7789fa85e8c1698d8abc691a66e7643 (diff)
downloadredmine-9c5199f5f5d7f5c52f6dce5a5f0ebd707cc30289.tar.gz
redmine-9c5199f5f5d7f5c52f6dce5a5f0ebd707cc30289.zip
Reverts r23328 (#41853).
git-svn-id: https://svn.redmine.org/redmine/trunk@23342 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r--app/helpers/application_helper.rb17
1 files changed, 11 insertions, 6 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 4aa233851..bac8da266 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -651,12 +651,17 @@ module ApplicationHelper
def principals_check_box_tags(name, principals)
s = +''
principals.each do |principal|
- 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)
+ 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
+ )
end
s.html_safe
end