summaryrefslogtreecommitdiff
path: root/app/services
diff options
context:
space:
mode:
authorNur Rony <pro.nmrony@gmail.com>2016-10-13 23:40:06 +0600
committerNur Rony <pro.nmrony@gmail.com>2016-11-16 00:03:24 +0600
commiteaef94533d8de1747631269f085ba58d6316a899 (patch)
tree8985ebbc1ff0c7c15b6f241ff356c95ed41278fd /app/services
parent4a4c57f7b8b1fdf5957ad1f2d78d96231eec8ff8 (diff)
downloadgitlab-ce-eaef94533d8de1747631269f085ba58d6316a899.tar.gz
shows user avatar in mention autocomplete in editor22790-mention-autocomplete-avatar
adds entry in CHANGELOG no uninitialized variable and unnecessary if statement formatting issue in CHANGELOG resolves scss lint warings cleanup: unnecessary css classes adds css class that cleaned up by mistake replaces snake_case variables name with camelCase removes unnecessary css class and adds white color border for avatar moves changelog entry from 8.13 to 8.14 remove bottom margin from avatar-inline resolves lint warnings rebased and moves changelog entry to 8.14 fixes avatar shifting on hover adds entry at top of 8.14 section in CHANGELOG.md calls sanitization for gl.utils syncing changelog with master and created changelog files using cli changes changelog title
Diffstat (limited to 'app/services')
-rw-r--r--app/services/projects/participants_service.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/app/services/projects/participants_service.rb b/app/services/projects/participants_service.rb
index d38328403c1..6040391fd94 100644
--- a/app/services/projects/participants_service.rb
+++ b/app/services/projects/participants_service.rb
@@ -1,7 +1,7 @@
module Projects
class ParticipantsService < BaseService
attr_reader :noteable
-
+
def execute(noteable)
@noteable = noteable
@@ -15,7 +15,8 @@ module Projects
[{
name: noteable.author.name,
- username: noteable.author.username
+ username: noteable.author.username,
+ avatar_url: noteable.author.avatar_url
}]
end
@@ -28,14 +29,14 @@ module Projects
def sorted(users)
users.uniq.to_a.compact.sort_by(&:username).map do |user|
- { username: user.username, name: user.name }
+ { username: user.username, name: user.name, avatar_url: user.avatar_url }
end
end
def groups
current_user.authorized_groups.sort_by(&:path).map do |group|
count = group.users.count
- { username: group.path, name: group.name, count: count }
+ { username: group.path, name: group.name, count: count, avatar_url: group.avatar.url }
end
end