diff --git a/app/helpers/avatars_helper.rb b/app/helpers/avatars_helper.rb index 7e2a1fffd..41363f993 100644 --- a/app/helpers/avatars_helper.rb +++ b/app/helpers/avatars_helper.rb @@ -34,6 +34,18 @@ module AvatarsHelper avatar(user, options).to_s.html_safe end + def principal_avatar(principal, options={}) + return '' unless principal + options.merge!(:title => l(:"label_#{principal.class.name.downcase}") + ": " + principal.name) + if principal.is_a?(User) + avatar(principal, options).to_s.html_safe + elsif principal.is_a?(Group) + image_tag('group.png', options).to_s.html_safe + else + '' + end + end + # Returns the avatar image tag for the given +user+ if avatars are enabled # +user+ can be a User or a string that will be scanned for an email address (eg. 'joe ') def avatar(user, options = { }) diff --git a/app/views/projects/settings/_members.html.erb b/app/views/projects/settings/_members.html.erb index 6dab1c294..aac1f07b4 100644 --- a/app/views/projects/settings/_members.html.erb +++ b/app/views/projects/settings/_members.html.erb @@ -19,7 +19,9 @@ <% members.each do |member| %> <% next if member.new_record? %> - <%= link_to_user member.principal %> + + <%= principal_avatar(member.principal, :size => "14") %>
<%= link_to_user member.principal %>
+ <%= member.roles.sort.collect(&:to_s).join(', ') %>
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 88be93c37..dd554937e 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -306,6 +306,8 @@ table.files tbody th {text-align:left;} table.files tr.file td.filename { text-align: left; padding-left: 24px; } table.files tr.file td.digest { font-size: 80%; } +table.members td.name img { position: absolute; } +table.members td.name div { padding-left: 20px; } table.members td.roles, table.memberships td.roles { width: 45%; } table.messages td.last_message {text-align:left;}