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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
40f17d44
Commit
40f17d44
authored
Mar 24, 2017
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Port of '29880-refactor-sidebar-hacks' to EE
parent
d893b691
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
20 additions
and
19 deletions
+20
-19
app/assets/stylesheets/framework/nav.scss
app/assets/stylesheets/framework/nav.scss
+7
-5
app/assets/stylesheets/pages/builds.scss
app/assets/stylesheets/pages/builds.scss
+0
-6
app/helpers/nav_helper.rb
app/helpers/nav_helper.rb
+5
-1
app/views/layouts/_page.html.haml
app/views/layouts/_page.html.haml
+2
-1
app/views/projects/builds/_sidebar.html.haml
app/views/projects/builds/_sidebar.html.haml
+1
-1
app/views/projects/builds/show.html.haml
app/views/projects/builds/show.html.haml
+1
-1
app/views/projects/pipelines/_head.html.haml
app/views/projects/pipelines/_head.html.haml
+1
-1
app/views/projects/wikis/_sidebar.html.haml
app/views/projects/wikis/_sidebar.html.haml
+1
-1
app/views/shared/issuable/_sidebar.html.haml
app/views/shared/issuable/_sidebar.html.haml
+1
-1
spec/features/projects/members/user_requests_access_spec.rb
spec/features/projects/members/user_requests_access_spec.rb
+1
-1
No files found.
app/assets/stylesheets/framework/nav.scss
View file @
40f17d44
...
@@ -416,14 +416,16 @@
...
@@ -416,14 +416,16 @@
.page-with-layout-nav
{
.page-with-layout-nav
{
.right-sidebar
{
.right-sidebar
{
top
:
(
$header-height
*
2
)
+
2
;
top
:
(
$header-height
+
1
)
*
2
;
}
}
.build-sidebar
{
&
.page-with-sub-nav
{
top
:
(
$header-height
*
3
)
+
3
;
.right-sidebar
{
top
:
(
$header-height
+
1
)
*
3
;
&
.affix
{
&
.affix
{
top
:
0
;
top
:
0
;
}
}
}
}
}
}
}
...
...
app/assets/stylesheets/pages/builds.scss
View file @
40f17d44
...
@@ -366,9 +366,3 @@
...
@@ -366,9 +366,3 @@
right
:
0
;
right
:
0
;
margin-top
:
-17px
;
margin-top
:
-17px
;
}
}
@media
(
min-width
:
$screen-md-min
)
{
.sub-nav.build
{
width
:
calc
(
100%
+
#{
$gutter_width
}
);
}
}
app/helpers/nav_helper.rb
View file @
40f17d44
...
@@ -31,7 +31,11 @@ module NavHelper
...
@@ -31,7 +31,11 @@ module NavHelper
end
end
def
layout_nav_class
def
layout_nav_class
"page-with-layout-nav"
if
defined?
(
nav
)
&&
nav
class_name
=
''
class_name
<<
" page-with-layout-nav"
if
defined?
(
nav
)
&&
nav
class_name
<<
" page-with-sub-nav"
if
content_for?
(
:sub_nav
)
class_name
end
end
def
nav_control_class
def
nav_control_class
...
...
app/views/layouts/_page.html.haml
View file @
40f17d44
...
@@ -3,8 +3,9 @@
...
@@ -3,8 +3,9 @@
.layout-nav
.layout-nav
.container-fluid
.container-fluid
=
render
"layouts/nav/
#{
nav
}
"
=
render
"layouts/nav/
#{
nav
}
"
.content-wrapper
{
class:
"#{layout_nav_class}"
}
-
if
content_for?
(
:sub_nav
)
=
yield
:sub_nav
=
yield
:sub_nav
.content-wrapper
{
class:
layout_nav_class
}
.alert-wrapper
.alert-wrapper
=
render
"layouts/broadcast"
=
render
"layouts/broadcast"
=
render
"layouts/flash"
=
render
"layouts/flash"
...
...
app/views/projects/builds/_sidebar.html.haml
View file @
40f17d44
-
builds
=
@build
.
pipeline
.
builds
.
to_a
-
builds
=
@build
.
pipeline
.
builds
.
to_a
%aside
.right-sidebar.right-sidebar-expanded.build-sidebar.js-build-sidebar.js-right-sidebar
{
data:
{
"offset-top"
=>
"15
1
"
,
"spy"
=>
"affix"
}
}
%aside
.right-sidebar.right-sidebar-expanded.build-sidebar.js-build-sidebar.js-right-sidebar
{
data:
{
"offset-top"
=>
"15
3
"
,
"spy"
=>
"affix"
}
}
.block.build-sidebar-header.visible-xs-block.visible-sm-block.append-bottom-default
.block.build-sidebar-header.visible-xs-block.visible-sm-block.append-bottom-default
Job
Job
%strong
##{@build.id}
%strong
##{@build.id}
...
...
app/views/projects/builds/show.html.haml
View file @
40f17d44
-
@no_container
=
true
-
@no_container
=
true
-
page_title
"
#{
@build
.
name
}
(#
#{
@build
.
id
}
)"
,
"Jobs"
-
page_title
"
#{
@build
.
name
}
(#
#{
@build
.
id
}
)"
,
"Jobs"
=
render
"projects/pipelines/head"
,
build_subnav:
true
=
render
"projects/pipelines/head"
%div
{
class:
container_class
}
%div
{
class:
container_class
}
.build-page
.build-page
...
...
app/views/projects/pipelines/_head.html.haml
View file @
40f17d44
=
content_for
:sub_nav
do
=
content_for
:sub_nav
do
.scrolling-tabs-container.sub-nav-scroll
.scrolling-tabs-container.sub-nav-scroll
=
render
'shared/nav_scroll'
=
render
'shared/nav_scroll'
.nav-links.sub-nav.scrolling-tabs
{
class:
(
'build'
if
local_assigns
.
fetch
(
:build_subnav
,
false
))
}
.nav-links.sub-nav.scrolling-tabs
%ul
{
class:
(
container_class
)
}
%ul
{
class:
(
container_class
)
}
-
if
project_nav_tab?
:pipelines
-
if
project_nav_tab?
:pipelines
=
nav_link
(
path:
'pipelines#index'
,
controller: :pipelines
)
do
=
nav_link
(
path:
'pipelines#index'
,
controller: :pipelines
)
do
...
...
app/views/projects/wikis/_sidebar.html.haml
View file @
40f17d44
%aside
.right-sidebar.right-sidebar-expanded.wiki-sidebar.js-wiki-sidebar.js-right-sidebar
{
data:
{
"offset-top"
=>
"10
1
"
,
"spy"
=>
"affix"
}
}
%aside
.right-sidebar.right-sidebar-expanded.wiki-sidebar.js-wiki-sidebar.js-right-sidebar
{
data:
{
"offset-top"
=>
"10
2
"
,
"spy"
=>
"affix"
}
}
.block.wiki-sidebar-header.append-bottom-default
.block.wiki-sidebar-header.append-bottom-default
%a
.gutter-toggle.pull-right.visible-xs-block.visible-sm-block.js-sidebar-wiki-toggle
{
href:
"#"
}
%a
.gutter-toggle.pull-right.visible-xs-block.visible-sm-block.js-sidebar-wiki-toggle
{
href:
"#"
}
=
icon
(
'angle-double-right'
)
=
icon
(
'angle-double-right'
)
...
...
app/views/shared/issuable/_sidebar.html.haml
View file @
40f17d44
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
=
page_specific_javascript_bundle_tag
(
'common_vue'
)
=
page_specific_javascript_bundle_tag
(
'common_vue'
)
=
page_specific_javascript_bundle_tag
(
'issuable'
)
=
page_specific_javascript_bundle_tag
(
'issuable'
)
%aside
.right-sidebar.js-right-sidebar
{
data:
{
"offset-top"
=>
"10
1
"
,
"spy"
=>
"affix"
},
class:
sidebar_gutter_collapsed_class
,
'aria-live'
=>
'polite'
}
%aside
.right-sidebar.js-right-sidebar
{
data:
{
"offset-top"
=>
"10
2
"
,
"spy"
=>
"affix"
},
class:
sidebar_gutter_collapsed_class
,
'aria-live'
=>
'polite'
}
.issuable-sidebar
.issuable-sidebar
-
can_edit_issuable
=
can?
(
current_user
,
:"admin_
#{
issuable
.
to_ability_name
}
"
,
@project
)
-
can_edit_issuable
=
can?
(
current_user
,
:"admin_
#{
issuable
.
to_ability_name
}
"
,
@project
)
.block.issuable-sidebar-header
.block.issuable-sidebar-header
...
...
spec/features/projects/members/user_requests_access_spec.rb
View file @
40f17d44
...
@@ -61,7 +61,7 @@ feature 'Projects > Members > User requests access', feature: true do
...
@@ -61,7 +61,7 @@ feature 'Projects > Members > User requests access', feature: true do
click_link
(
'Settings'
)
click_link
(
'Settings'
)
end
end
page
.
within
(
'.
page-with-layout-nav .
sub-nav'
)
do
page
.
within
(
'.sub-nav'
)
do
click_link
(
'Members'
)
click_link
(
'Members'
)
end
end
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