BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
groups_helper.rb
app/helpers/groups_helper.rb
+1
-1
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