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
Boxiang Sun
gitlab-ce
Commits
da5073cc
Commit
da5073cc
authored
Oct 05, 2017
by
kushalpandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Render droplab button only if Subgroups feature is supported
parent
29fee002
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
app/views/groups/show.html.haml
app/views/groups/show.html.haml
+13
-12
No files found.
app/views/groups/show.html.haml
View file @
da5073cc
...
...
@@ -15,20 +15,19 @@
-
if
can?
current_user
,
:create_projects
,
@group
-
new_project_label
=
_
(
"New project"
)
-
new_subgroup_label
=
_
(
"New subgroup"
)
.btn-group.new-project-subgroup.droplab-dropdown.js-new-project-subgroup
{
data:
{
project_path:
new_project_path
(
namespace_id:
@group
.
id
),
subgroup_path:
new_group_path
(
parent_id:
@group
.
id
)
}
}
%input
.btn.btn-success.dropdown-primary.js-new-group-child
{
type:
"button"
,
value:
new_project_label
,
data:
{
action:
"new-project"
}
}
-
if
can_create_subgroups
-
if
can_create_subgroups
.btn-group.new-project-subgroup.droplab-dropdown.js-new-project-subgroup
{
data:
{
project_path:
new_project_path
(
namespace_id:
@group
.
id
),
subgroup_path:
new_group_path
(
parent_id:
@group
.
id
)
}
}
%input
.btn.btn-success.dropdown-primary.js-new-group-child
{
type:
"button"
,
value:
new_project_label
,
data:
{
action:
"new-project"
}
}
%button
.btn.btn-success.dropdown-toggle.js-dropdown-toggle
{
type:
"button"
,
data:
{
"dropdown-trigger"
=>
"#new-project-or-subgroup-dropdown"
}
}
=
icon
(
"caret-down"
,
class:
"dropdown-btn-icon"
)
%ul
#new-project-or-subgroup-dropdown
.dropdown-menu.dropdown-menu-align-right
{
data:
{
dropdown:
true
}
}
%li
.droplab-item-selected
{
role:
"button"
,
data:
{
value:
"new-project"
,
text:
new_project_label
}
}
.menu-item
.icon-container
=
icon
(
"check"
,
class:
"list-item-checkmark"
)
.description
%strong
=
new_project_label
%span
=
s_
(
"GroupsTree|Create project under this group."
)
-
if
can_create_subgroups
%ul
#new-project-or-subgroup-dropdown
.dropdown-menu.dropdown-menu-align-right
{
data:
{
dropdown:
true
}
}
%li
.droplab-item-selected
{
role:
"button"
,
data:
{
value:
"new-project"
,
text:
new_project_label
}
}
.menu-item
.icon-container
=
icon
(
"check"
,
class:
"list-item-checkmark"
)
.description
%strong
=
new_project_label
%span
=
s_
(
"GroupsTree|Create project under this group."
)
%li
.divider.droplap-item-ignore
%li
{
role:
"button"
,
data:
{
value:
"new-subgroup"
,
text:
new_subgroup_label
}
}
.menu-item
...
...
@@ -37,6 +36,8 @@
.description
%strong
=
new_subgroup_label
%span
=
s_
(
"GroupsTree|Create a subgroup under this group."
)
-
else
=
link_to
new_project_label
,
new_project_path
(
namespace_id:
@group
.
id
),
class:
"btn btn-success"
-
if
params
[
:filter
].
blank?
&&
@children
.
empty?
=
render
"shared/groups/empty_state"
...
...
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