Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
3427912e
Commit
3427912e
authored
Jun 06, 2017
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expose avatar URL for groups
parent
bd951384
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
app/helpers/groups_helper.rb
app/helpers/groups_helper.rb
+1
-1
app/serializers/group_entity.rb
app/serializers/group_entity.rb
+5
-1
No files found.
app/helpers/groups_helper.rb
View file @
3427912e
...
...
@@ -8,7 +8,7 @@ module GroupsHelper
group
=
Group
.
find_by_full_path
(
group
)
end
group
.
try
(
:avatar_url
)
||
image_path
(
'no_group_avatar.png'
)
group
.
try
(
:avatar_url
)
||
ActionController
::
Base
.
helpers
.
image_path
(
'no_group_avatar.png'
)
end
def
group_title
(
group
,
name
=
nil
,
url
=
nil
)
...
...
app/serializers/group_entity.rb
View file @
3427912e
...
...
@@ -2,9 +2,9 @@ class GroupEntity < Grape::Entity
include
ActionView
::
Helpers
::
NumberHelper
include
RequestAwareEntity
include
MembersHelper
include
GroupsHelper
expose
:id
,
:name
,
:path
,
:description
,
:visibility
expose
:avatar_url
expose
:web_url
expose
:full_name
,
:full_path
expose
:parent_id
...
...
@@ -39,4 +39,8 @@ class GroupEntity < Grape::Entity
expose
:number_users_with_delimiter
do
|
group
|
number_with_delimiter
(
group
.
users
.
count
)
end
expose
:avatar_url
do
|
group
|
group_icon
(
group
)
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment