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
Tatuya Kamada
gitlab-ce
Commits
64ef2e08
Commit
64ef2e08
authored
May 06, 2016
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move group settings navigation to own partial
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
b1230bbd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
40 deletions
+21
-40
app/views/layouts/nav/_group.html.haml
app/views/layouts/nav/_group.html.haml
+1
-20
app/views/layouts/nav/_group_settings.html.haml
app/views/layouts/nav/_group_settings.html.haml
+20
-20
No files found.
app/views/layouts/nav/_group.html.haml
View file @
64ef2e08
-
if
current_user
=
render
'layouts/nav/group_settings'
-
if
access
=
@group
.
users
.
find_by
(
id:
current_user
.
id
)
.controls
%span
.dropdown.group-settings-dropdown
%a
.dropdown-new.btn.btn-gray
#group-settings-button
{
href:
'#'
,
'data-toggle'
=>
'dropdown'
}
=
icon
(
'cog'
)
=
icon
(
'caret-down'
)
%ul
.dropdown-menu.dropdown-menu-align-right
-
if
can?
(
current_user
,
:admin_group
,
@group
)
=
nav_link
(
path:
'groups#projects'
)
do
=
link_to
projects_group_path
(
@group
),
title:
'Projects'
do
Projects
%li
.divider
%li
=
link_to
edit_group_path
(
@group
)
do
Edit Group
%li
=
link_to
leave_group_group_members_path
(
@group
),
data:
{
confirm:
leave_group_message
(
@group
.
name
)
},
method: :delete
,
title:
'Leave group'
do
Leave Group
%ul
.nav-links
%ul
.nav-links
=
nav_link
(
path:
'groups#show'
,
html_options:
{
class:
'home'
})
do
=
nav_link
(
path:
'groups#show'
,
html_options:
{
class:
'home'
})
do
...
...
app/views/layouts/nav/_group_settings.html.haml
View file @
64ef2e08
%ul
.nav.nav-sideba
r
-
if
current_use
r
=
nav_link
do
-
if
access
=
@group
.
users
.
find_by
(
id:
current_user
.
id
)
=
link_to
group_path
(
@group
),
title:
'Go to group'
,
class:
'back-link'
do
.controls
=
icon
(
'caret-square-o-left fw'
)
%span
.dropdown.group-settings-dropdown
%span
%a
.dropdown-new.btn.btn-gray
#group-settings-button
{
href:
'#'
,
'data-toggle'
=>
'dropdown'
}
Go to group
=
icon
(
'cog'
)
=
icon
(
'caret-down'
)
%li
.separate-item
%ul
.dropdown-menu.dropdown-menu-align-right
-
if
can?
(
current_user
,
:admin_group
,
@group
)
%ul
.sidebar-subnav
=
nav_link
(
path:
'groups#projects'
)
do
=
nav_link
(
path:
'groups#edit'
)
do
=
link_to
projects_group_path
(
@group
),
title:
'Projects'
do
=
link_to
edit_group_path
(
@group
),
title:
'Group Settings'
do
Projects
=
icon
(
'pencil-square-o fw'
)
%li
.divider
%span
%li
Group Settings
=
link_to
edit_group_path
(
@group
)
do
=
nav_link
(
path:
'groups#projects'
)
do
Edit Group
=
link_to
projects_group_path
(
@group
),
title:
'Projects'
do
%li
=
icon
(
'folder fw'
)
=
link_to
leave_group_group_members_path
(
@group
),
%span
data:
{
confirm:
leave_group_message
(
@group
.
name
)
},
method: :delete
,
title:
'Leave group'
do
Projects
Leave Group
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