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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
a0f13d2f
Commit
a0f13d2f
authored
Jun 16, 2017
by
Alfredo Sumaran
Committed by
Dmitriy Zaporozhets
Jun 16, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expose correct path to group
parent
459d8d65
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
4 deletions
+13
-4
app/assets/javascripts/groups/components/group_item.vue
app/assets/javascripts/groups/components/group_item.vue
+3
-3
app/assets/javascripts/groups/stores/groups_store.js
app/assets/javascripts/groups/stores/groups_store.js
+1
-0
app/serializers/group_entity.rb
app/serializers/group_entity.rb
+5
-1
spec/javascripts/groups/mock_data.js
spec/javascripts/groups/mock_data.js
+4
-0
No files found.
app/assets/javascripts/groups/components/group_item.vue
View file @
a0f13d2f
...
@@ -27,7 +27,7 @@ export default {
...
@@ -27,7 +27,7 @@ export default {
if
(
this
.
group
.
hasSubgroups
)
{
if
(
this
.
group
.
hasSubgroups
)
{
eventHub
.
$emit
(
'
toggleSubGroups
'
,
this
.
group
);
eventHub
.
$emit
(
'
toggleSubGroups
'
,
this
.
group
);
}
else
{
}
else
{
window
.
location
.
href
=
this
.
group
.
webUrl
;
window
.
location
.
href
=
this
.
group
.
groupPath
;
}
}
}
}
},
},
...
@@ -192,7 +192,7 @@ export default {
...
@@ -192,7 +192,7 @@ export default {
<div
<div
class=
"avatar-container s40 hidden-xs"
>
class=
"avatar-container s40 hidden-xs"
>
<a
<a
:href=
"group.
webUrl
"
>
:href=
"group.
groupPath
"
>
<img
<img
class=
"avatar s40"
class=
"avatar s40"
:src=
"group.avatarUrl"
:src=
"group.avatarUrl"
...
@@ -202,7 +202,7 @@ export default {
...
@@ -202,7 +202,7 @@ export default {
<div
<div
class=
"title"
>
class=
"title"
>
<a
<a
:href=
"group.
webUrl
"
>
{{
fullPath
}}
</a>
:href=
"group.
groupPath
"
>
{{
fullPath
}}
</a>
<template
v-if=
"group.permissions.humanGroupAccess"
>
<template
v-if=
"group.permissions.humanGroupAccess"
>
as
as
<span
class=
"access-type"
>
{{
group
.
permissions
.
humanGroupAccess
}}
</span>
<span
class=
"access-type"
>
{{
group
.
permissions
.
humanGroupAccess
}}
</span>
...
...
app/assets/javascripts/groups/stores/groups_store.js
View file @
a0f13d2f
...
@@ -122,6 +122,7 @@ export default class GroupsStore {
...
@@ -122,6 +122,7 @@ export default class GroupsStore {
canEdit
:
rawGroup
.
can_edit
,
canEdit
:
rawGroup
.
can_edit
,
description
:
rawGroup
.
description
,
description
:
rawGroup
.
description
,
webUrl
:
rawGroup
.
web_url
,
webUrl
:
rawGroup
.
web_url
,
groupPath
:
rawGroup
.
group_path
,
parentId
:
rawGroup
.
parent_id
,
parentId
:
rawGroup
.
parent_id
,
visibility
:
rawGroup
.
visibility
,
visibility
:
rawGroup
.
visibility
,
leavePath
:
rawGroup
.
leave_path
,
leavePath
:
rawGroup
.
leave_path
,
...
...
app/serializers/group_entity.rb
View file @
a0f13d2f
...
@@ -5,11 +5,15 @@ class GroupEntity < Grape::Entity
...
@@ -5,11 +5,15 @@ class GroupEntity < Grape::Entity
include
GroupsHelper
include
GroupsHelper
expose
:id
,
:name
,
:path
,
:description
,
:visibility
expose
:id
,
:name
,
:path
,
:description
,
:visibility
expose
:web_url
expose
:full_name
,
:full_path
expose
:full_name
,
:full_path
expose
:web_url
expose
:parent_id
expose
:parent_id
expose
:created_at
,
:updated_at
expose
:created_at
,
:updated_at
expose
:group_path
do
|
group
|
group_path
(
group
)
end
expose
:permissions
do
expose
:permissions
do
expose
:human_group_access
do
|
group
,
options
|
expose
:human_group_access
do
|
group
,
options
|
group
.
group_members
.
find_by
(
user_id:
request
.
current_user
)
&
.
human_access
group
.
group_members
.
find_by
(
user_id:
request
.
current_user
)
&
.
human_access
...
...
spec/javascripts/groups/mock_data.js
View file @
a0f13d2f
...
@@ -6,6 +6,7 @@ const group1 = {
...
@@ -6,6 +6,7 @@ const group1 = {
visibility
:
'
public
'
,
visibility
:
'
public
'
,
avatar_url
:
null
,
avatar_url
:
null
,
web_url
:
'
http://localhost:3000/groups/level1
'
,
web_url
:
'
http://localhost:3000/groups/level1
'
,
group_path
:
'
/level1
'
,
full_name
:
'
level1
'
,
full_name
:
'
level1
'
,
full_path
:
'
level1
'
,
full_path
:
'
level1
'
,
parent_id
:
null
,
parent_id
:
null
,
...
@@ -28,6 +29,7 @@ const group14 = {
...
@@ -28,6 +29,7 @@ const group14 = {
visibility
:
'
public
'
,
visibility
:
'
public
'
,
avatar_url
:
null
,
avatar_url
:
null
,
web_url
:
'
http://localhost:3000/groups/level1/level2/level3/level4
'
,
web_url
:
'
http://localhost:3000/groups/level1/level2/level3/level4
'
,
group_path
:
'
/level1/level2/level3/level4
'
,
full_name
:
'
level1 / level2 / level3 / level4
'
,
full_name
:
'
level1 / level2 / level3 / level4
'
,
full_path
:
'
level1/level2/level3/level4
'
,
full_path
:
'
level1/level2/level3/level4
'
,
parent_id
:
1127
,
parent_id
:
1127
,
...
@@ -49,6 +51,7 @@ const group2 = {
...
@@ -49,6 +51,7 @@ const group2 = {
visibility
:
'
public
'
,
visibility
:
'
public
'
,
avatar_url
:
null
,
avatar_url
:
null
,
web_url
:
'
http://localhost:3000/groups/devops
'
,
web_url
:
'
http://localhost:3000/groups/devops
'
,
group_path
:
'
/devops
'
,
full_name
:
'
devops
'
,
full_name
:
'
devops
'
,
full_path
:
'
devops
'
,
full_path
:
'
devops
'
,
parent_id
:
null
,
parent_id
:
null
,
...
@@ -70,6 +73,7 @@ const group21 = {
...
@@ -70,6 +73,7 @@ const group21 = {
visibility
:
'
public
'
,
visibility
:
'
public
'
,
avatar_url
:
null
,
avatar_url
:
null
,
web_url
:
'
http://localhost:3000/groups/devops/chef
'
,
web_url
:
'
http://localhost:3000/groups/devops/chef
'
,
group_path
:
'
/devops/chef
'
,
full_name
:
'
devops / chef
'
,
full_name
:
'
devops / chef
'
,
full_path
:
'
devops/chef
'
,
full_path
:
'
devops/chef
'
,
parent_id
:
1119
,
parent_id
:
1119
,
...
...
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