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
c1b44cfe
Commit
c1b44cfe
authored
Jul 08, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hide group control nav if no options present
Closes #19120
parent
2778dec1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
_group.html.haml
app/views/layouts/nav/_group.html.haml
+1
-1
_group_settings.html.haml
app/views/layouts/nav/_group_settings.html.haml
+4
-0
No files found.
app/views/layouts/nav/_group.html.haml
View file @
c1b44cfe
=
render
'layouts/nav/group_settings'
.scrolling-tabs-container
{
class:
nav_control_class
}
=
render
'layouts/nav/group_settings'
.fade-left
=
icon
(
'angle-left'
)
.fade-right
...
...
app/views/layouts/nav/_group_settings.html.haml
View file @
c1b44cfe
-
if
current_user
-
can_admin_projects
=
can?
(
current_user
,
:admin_group
,
@group
)
-
can_edit
=
can?
(
current_user
,
:admin_group
,
@group
)
-
member
=
@group
.
members
.
find_by
(
user_id:
current_user
.
id
)
-
can_leave
=
member
&&
can?
(
current_user
,
:destroy_group_member
,
member
)
-
if
can_admin_projects
||
can_edit
||
can_leave
.controls
.dropdown.group-settings-dropdown
%a
.dropdown-new.btn.btn-default
#group-settings-button
{
href:
'#'
,
'data-toggle'
=>
'dropdown'
}
=
icon
(
'cog'
)
=
icon
(
'caret-down'
)
%ul
.dropdown-menu.dropdown-menu-align-right
-
if
can_admin_projects
=
nav_link
(
path:
'groups#projects'
)
do
=
link_to
'Projects'
,
projects_group_path
(
@group
),
title:
'Projects'
-
if
can_edit
||
can_leave
%li
.divider
-
if
can_edit
%li
...
...
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