diff options
author | Marius Balteanu <marius.balteanu@zitec.com> | 2024-11-30 10:51:51 +0000 |
---|---|---|
committer | Marius Balteanu <marius.balteanu@zitec.com> | 2024-11-30 10:51:51 +0000 |
commit | 9c5199f5f5d7f5c52f6dce5a5f0ebd707cc30289 (patch) | |
tree | 286a27abad5ef26d7a75b77d8118e51271e83f5d /app | |
parent | 3086ea3ce7789fa85e8c1698d8abc691a66e7643 (diff) | |
download | redmine-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')
-rw-r--r-- | app/assets/stylesheets/application.css | 5 | ||||
-rw-r--r-- | app/helpers/application_helper.rb | 17 | ||||
-rw-r--r-- | app/helpers/watchers_helper.rb | 2 |
3 files changed, 12 insertions, 12 deletions
diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 6a7449571..1c9595172 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -433,8 +433,6 @@ tr.version td.date, tr.version td.status, tr.version td.sharing { text-align: ce tr.member td.icon-user, #principals_for_new_member .icon-user {background:transparent;} #principals_for_new_member svg {margin-right: 4px;} -#principals_for_new_member img.gravatar {margin-right: 4px;} -#principals_for_new_member span.icon:empty { display: none; } tr.user td {width:13%;white-space: nowrap;} td.username, td.firstname, td.lastname, td.email {text-align:left !important;} @@ -539,10 +537,7 @@ td.center {text-align:center;} #watchers select {width: 95%; display: block;} #watchers img.gravatar {margin: 0 4px 2px 0;} -#watchers svg.icon-svg {margin: 0 2px 2px 0;} #users_for_watcher img.gravatar {padding-bottom: 2px; margin-right: 4px;} -#users_for_watcher svg.icon-svg {padding-bottom: 2px; margin-right: 2px;} -#users_for_watcher span.icon:empty { display: none; } span#watchers_inputs {overflow:auto; display:block;} span.search_for_watchers {display:block;} 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 diff --git a/app/helpers/watchers_helper.rb b/app/helpers/watchers_helper.rb index 00afd30ae..f7763e41b 100644 --- a/app/helpers/watchers_helper.rb +++ b/app/helpers/watchers_helper.rb @@ -49,7 +49,7 @@ module WatchersHelper content = ''.html_safe lis = object.watcher_users.sorted.collect do |user| s = ''.html_safe - s << avatar(user, :size => "16").to_s if user.is_a?(User) + s << avatar(user, :size => "16").to_s s << link_to_principal(user, class: user.class.to_s.downcase) if object.respond_to?(:visible?) && user.is_a?(User) && !object.visible?(user) s << content_tag('span', l(:notice_invalid_watcher), class: 'icon-only icon-warning', title: l(:notice_invalid_watcher)) |