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
a472f078
Commit
a472f078
authored
May 24, 2017
by
Alfredo Sumaran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove parent group prefix from current orphan group
[ci skip]
parent
5eb885e5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
3 deletions
+36
-3
group_folder.vue
app/assets/javascripts/groups/components/group_folder.vue
+5
-1
group_item.vue
app/assets/javascripts/groups/components/group_item.vue
+31
-2
No files found.
app/assets/javascripts/groups/components/group_folder.vue
View file @
a472f078
...
@@ -5,6 +5,10 @@ export default {
...
@@ -5,6 +5,10 @@ export default {
type
:
Object
,
type
:
Object
,
required
:
true
,
required
:
true
,
},
},
baseGroup
:
{
type
:
Object
,
required
:
false
,
},
},
},
computed
:
{
computed
:
{
hasGroups
()
{
hasGroups
()
{
...
@@ -16,6 +20,6 @@ export default {
...
@@ -16,6 +20,6 @@ export default {
<
template
>
<
template
>
<ul
class=
"content-list group-list-tree"
v-show=
"hasGroups"
>
<ul
class=
"content-list group-list-tree"
v-show=
"hasGroups"
>
<group-item
v-for=
"(group, index) in groups"
:key=
"index"
:group=
"group"
/>
<group-item
v-for=
"(group, index) in groups"
:key=
"index"
:group=
"group"
:baseGroup=
"baseGroup"
/>
</ul>
</ul>
</
template
>
</
template
>
app/assets/javascripts/groups/components/group_item.vue
View file @
a472f078
...
@@ -7,6 +7,10 @@ export default {
...
@@ -7,6 +7,10 @@ export default {
type
:
Object
,
type
:
Object
,
required
:
true
,
required
:
true
,
},
},
baseGroup
:
{
type
:
Object
,
required
:
false
,
},
},
},
methods
:
{
methods
:
{
toggleSubGroups
(
e
)
{
toggleSubGroups
(
e
)
{
...
@@ -31,6 +35,31 @@ export default {
...
@@ -31,6 +35,31 @@ export default {
isExpandable
()
{
isExpandable
()
{
return
Object
.
keys
(
this
.
group
.
subGroups
).
length
>
0
;
return
Object
.
keys
(
this
.
group
.
subGroups
).
length
>
0
;
},
},
fullPath
()
{
let
fullPath
=
''
;
if
(
this
.
group
.
isOrphan
)
{
// check if current group is baseGroup
if
(
this
.
baseGroup
)
{
// Remove baseGroup prefix from our current group.fullName. e.g:
// baseGroup.fullName: `level1`
// group.fullName: `level1 / level2 / level3`
// Result: `level2 / level3`
const
gfn
=
this
.
group
.
fullName
;
const
bfn
=
this
.
baseGroup
.
fullName
;
const
length
=
bfn
.
length
;
const
start
=
gfn
.
indexOf
(
bfn
);
fullPath
=
gfn
.
substr
(
start
+
length
+
2
);
}
else
{
fullPath
=
this
.
group
.
fullName
;
}
}
else
{
fullPath
=
this
.
group
.
name
;
}
return
fullPath
;
},
},
},
};
};
</
script
>
</
script
>
...
@@ -92,13 +121,13 @@ export default {
...
@@ -92,13 +121,13 @@ export default {
</div>
</div>
<div
class=
"title"
>
<div
class=
"title"
>
<a
:href=
"group.webUrl"
>
{{
group
.
isOrphan
?
group
.
fullName
:
group
.
name
}}
</a>
<a
:href=
"group.webUrl"
>
{{
fullPath
}}
</a>
</div>
</div>
<div
class=
"description"
>
<div
class=
"description"
>
{{
group
.
description
}}
{{
group
.
description
}}
</div>
</div>
<group-folder
v-if=
"group.isOpen"
:groups=
"group.subGroups"
/>
<group-folder
v-if=
"group.isOpen"
:groups=
"group.subGroups"
:baseGroup=
"group"
/>
</li>
</li>
</
template
>
</
template
>
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