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
iv
gitlab-ce
Commits
a521e88f
Commit
a521e88f
authored
Jun 16, 2015
by
Nicolas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix consistency issue in sidebars of Project and Group Settings.
Fixes #2277.
parent
c465af09
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
37 additions
and
36 deletions
+37
-36
app/controllers/groups_controller.rb
app/controllers/groups_controller.rb
+2
-0
app/helpers/groups_helper.rb
app/helpers/groups_helper.rb
+0
-8
app/views/groups/edit.html.haml
app/views/groups/edit.html.haml
+0
-1
app/views/layouts/group.html.haml
app/views/layouts/group.html.haml
+1
-1
app/views/layouts/group_settings.html.haml
app/views/layouts/group_settings.html.haml
+4
-0
app/views/layouts/nav/_group.html.haml
app/views/layouts/nav/_group.html.haml
+2
-18
app/views/layouts/nav/_group_settings.html.haml
app/views/layouts/nav/_group_settings.html.haml
+20
-0
app/views/layouts/nav/_project.html.haml
app/views/layouts/nav/_project.html.haml
+2
-2
app/views/layouts/nav/_project_settings.html.haml
app/views/layouts/nav/_project_settings.html.haml
+4
-4
features/steps/project/active_tab.rb
features/steps/project/active_tab.rb
+2
-2
No files found.
app/controllers/groups_controller.rb
View file @
a521e88f
...
...
@@ -121,6 +121,8 @@ class GroupsController < Groups::ApplicationController
def
determine_layout
if
[
:new
,
:create
].
include?
(
action_name
.
to_sym
)
'application'
elsif
[
:edit
,
:update
,
:projects
].
include?
(
action_name
.
to_sym
)
'group_settings'
else
'group'
end
...
...
app/helpers/groups_helper.rb
View file @
a521e88f
...
...
@@ -19,14 +19,6 @@ module GroupsHelper
end
end
def
group_settings_page?
if
current_controller?
(
'groups'
)
current_action?
(
'edit'
)
||
current_action?
(
'projects'
)
else
false
end
end
def
group_icon
(
group
)
if
group
.
is_a?
(
String
)
group
=
Group
.
find_by
(
path:
group
)
...
...
app/views/groups/edit.html.haml
View file @
a521e88f
-
page_title
"Settings"
.panel.panel-default
.panel-heading
%strong
=
@group
.
name
...
...
app/views/layouts/group.html.haml
View file @
a521e88f
-
page_title
@group
.
name
-
header_title
@group
.
name
,
group_path
(
@group
)
-
sidebar
"group"
-
sidebar
"group"
unless
sidebar
=
render
template:
"layouts/application"
app/views/layouts/group_settings.html.haml
0 → 100644
View file @
a521e88f
-
page_title
"Settings"
-
sidebar
"group_settings"
=
render
template:
"layouts/group"
app/views/layouts/nav/_group.html.haml
View file @
a521e88f
...
...
@@ -29,25 +29,9 @@
=
icon
(
'users fw'
)
%span
Members
-
if
can?
(
current_user
,
:admin_group
,
@group
)
=
nav_link
(
html_options:
{
class:
"
#{
"active"
if
group_settings_page?
}
separate-item"
})
do
=
link_to
edit_group_path
(
@group
),
title:
'Settings'
,
class:
'tab no-highlight'
,
data:
{
placement:
'right'
}
do
=
nav_link
(
html_options:
{
class:
"separate-item"
})
do
=
link_to
edit_group_path
(
@group
),
title:
'Settings'
,
data:
{
placement:
'right'
}
do
=
icon
(
'cogs fw'
)
%span
Settings
=
icon
(
'angle-down fw'
)
-
if
group_settings_page?
%ul
.sidebar-subnav
=
nav_link
(
path:
'groups#edit'
)
do
=
link_to
edit_group_path
(
@group
),
title:
'Group'
,
data:
{
placement:
'right'
}
do
=
icon
(
'pencil-square-o'
)
%span
Group Settings
=
nav_link
(
path:
'groups#projects'
)
do
=
link_to
projects_group_path
(
@group
),
title:
'Projects'
,
data:
{
placement:
'right'
}
do
=
icon
(
'folder'
)
%span
Projects
app/views/layouts/nav/_group_settings.html.haml
0 → 100644
View file @
a521e88f
%ul
.nav.nav-sidebar
=
nav_link
do
=
link_to
group_path
(
@group
),
title:
'Back to group'
,
data:
{
placement:
'right'
}
do
=
icon
(
'caret-square-o-left fw'
)
%span
Back to group
%li
.separate-item
%ul
.sidebar-subnav
=
nav_link
(
path:
'groups#edit'
)
do
=
link_to
edit_group_path
(
@group
),
title:
'Group Settings'
,
data:
{
placement:
'right'
}
do
=
icon
(
'pencil-square-o fw'
)
%span
Group Settings
=
nav_link
(
path:
'groups#projects'
)
do
=
link_to
projects_group_path
(
@group
),
title:
'Projects'
,
data:
{
placement:
'right'
}
do
=
icon
(
'folder fw'
)
%span
Projects
app/views/layouts/nav/_project.html.haml
View file @
a521e88f
%ul
.
project-navigation.
nav.nav-sidebar
%ul
.nav.nav-sidebar
=
nav_link
(
path:
'projects#show'
,
html_options:
{
class:
'home'
})
do
=
link_to
project_path
(
@project
),
title:
'Project'
,
class:
'shortcuts-project'
,
data:
{
placement:
'right'
}
do
=
icon
(
'dashboard fw'
)
...
...
@@ -86,7 +86,7 @@
-
if
project_nav_tab?
:settings
=
nav_link
(
html_options:
{
class:
"
#{
project_tab_class
}
separate-item"
})
do
=
link_to
edit_project_path
(
@project
),
title:
'Settings'
,
class:
'stat-tab tab no-highlight'
,
data:
{
placement:
'right'
}
do
=
link_to
edit_project_path
(
@project
),
title:
'Settings'
,
data:
{
placement:
'right'
}
do
=
icon
(
'cogs fw'
)
%span
Settings
app/views/layouts/nav/_project_settings.html.haml
View file @
a521e88f
%ul
.
project-navigation.
nav.nav-sidebar
%ul
.nav.nav-sidebar
=
nav_link
do
=
link_to
project_path
(
@project
),
title:
'Back to project'
,
data:
{
placement:
'right'
}
do
=
icon
(
'caret-square-o-left fw'
)
...
...
@@ -7,9 +7,9 @@
%li
.separate-item
%ul
.
project-settings-nav.
sidebar-subnav
%ul
.sidebar-subnav
=
nav_link
(
path:
'projects#edit'
)
do
=
link_to
edit_project_path
(
@project
),
title:
'Project
'
,
class:
'stat-tab tab
'
,
data:
{
placement:
'right'
}
do
=
link_to
edit_project_path
(
@project
),
title:
'Project
Settings
'
,
data:
{
placement:
'right'
}
do
=
icon
(
'pencil-square-o fw'
)
%span
Project Settings
...
...
@@ -32,5 +32,5 @@
=
link_to
namespace_project_protected_branches_path
(
@project
.
namespace
,
@project
),
title:
'Protected Branches'
,
data:
{
placement:
'right'
}
do
=
icon
(
'lock fw'
)
%span
Protected
b
ranches
Protected
B
ranches
features/steps/project/active_tab.rb
View file @
a521e88f
...
...
@@ -20,8 +20,8 @@ class Spinach::Features::ProjectActiveTab < Spinach::FeatureSteps
end
step
'I click the "Edit" tab'
do
page
.
within
'.
project-settings-
nav'
do
click_link
(
'Project'
)
page
.
within
'.
sidebar-sub
nav'
do
click_link
(
'Project
Settings
'
)
end
end
...
...
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