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
Léo-Paul Géneau
gitlab-ce
Commits
f8049f4e
Commit
f8049f4e
authored
Apr 02, 2018
by
André Luís
Committed by
Douwe Maan
Apr 02, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Backport changes in EE MR 4972: System Header and Footer
parent
712da68b
Changes
10
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
831 additions
and
32 deletions
+831
-32
app/assets/stylesheets/framework/sidebar.scss
app/assets/stylesheets/framework/sidebar.scss
+0
-1
app/assets/stylesheets/pages/issuable.scss
app/assets/stylesheets/pages/issuable.scss
+0
-4
app/assets/stylesheets/pages/repo.scss
app/assets/stylesheets/pages/repo.scss
+14
-10
app/assets/stylesheets/pages/repo.scss.orig
app/assets/stylesheets/pages/repo.scss.orig
+786
-0
app/controllers/admin/appearances_controller.rb
app/controllers/admin/appearances_controller.rb
+14
-4
app/helpers/appearances_helper.rb
app/helpers/appearances_helper.rb
+8
-8
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+4
-0
app/helpers/emails_helper.rb
app/helpers/emails_helper.rb
+2
-2
app/views/layouts/devise.html.haml
app/views/layouts/devise.html.haml
+2
-2
app/views/layouts/devise_empty.html.haml
app/views/layouts/devise_empty.html.haml
+1
-1
No files found.
app/assets/stylesheets/framework/sidebar.scss
View file @
f8049f4e
...
@@ -88,7 +88,6 @@
...
@@ -88,7 +88,6 @@
.right-sidebar
{
.right-sidebar
{
border-left
:
1px
solid
$border-color
;
border-left
:
1px
solid
$border-color
;
height
:
calc
(
100%
-
#{
$header-height
}
);
}
}
.with-performance-bar
.right-sidebar.affix
{
.with-performance-bar
.right-sidebar.affix
{
...
...
app/assets/stylesheets/pages/issuable.scss
View file @
f8049f4e
...
@@ -522,10 +522,6 @@
...
@@ -522,10 +522,6 @@
.with-performance-bar
.right-sidebar
{
.with-performance-bar
.right-sidebar
{
top
:
$header-height
+
$performance-bar-height
;
top
:
$header-height
+
$performance-bar-height
;
.issuable-sidebar
{
height
:
calc
(
100%
-
#{
$performance-bar-height
}
);
}
}
}
.sidebar-move-issue-confirmation-button
{
.sidebar-move-issue-confirmation-button
{
...
...
app/assets/stylesheets/pages/repo.scss
View file @
f8049f4e
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
.ide-view
{
.ide-view
{
display
:
flex
;
display
:
flex
;
height
:
calc
(
100vh
-
#{
$header-height
}
);
height
:
calc
(
100vh
-
#{
$header-height
}
);
margin-top
:
40px
;
margin-top
:
0
;
border-top
:
1px
solid
$white-dark
;
border-top
:
1px
solid
$white-dark
;
border-bottom
:
1px
solid
$white-dark
;
border-bottom
:
1px
solid
$white-dark
;
...
@@ -457,6 +457,8 @@
...
@@ -457,6 +457,8 @@
display
:
flex
;
display
:
flex
;
flex-direction
:
column
;
flex-direction
:
column
;
flex
:
1
;
flex
:
1
;
max-height
:
100%
;
overflow
:
auto
;
}
}
.multi-file-commit-empty-state-container
{
.multi-file-commit-empty-state-container
{
...
@@ -467,7 +469,7 @@
...
@@ -467,7 +469,7 @@
.multi-file-commit-panel-header
{
.multi-file-commit-panel-header
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
margin-bottom
:
12px
;
margin-bottom
:
0
;
border-bottom
:
1px
solid
$white-dark
;
border-bottom
:
1px
solid
$white-dark
;
padding
:
$gl-btn-padding
0
;
padding
:
$gl-btn-padding
0
;
...
@@ -674,8 +676,14 @@
...
@@ -674,8 +676,14 @@
overflow
:
hidden
;
overflow
:
hidden
;
&
.nav-only
{
&
.nav-only
{
padding-top
:
$header-height
;
.with-performance-bar
&
{
padding-top
:
$header-height
+
$performance-bar-height
;
}
.flash-container
{
.flash-container
{
margin-top
:
$header-height
;
margin-top
:
0
;
margin-bottom
:
0
;
margin-bottom
:
0
;
}
}
...
@@ -685,7 +693,7 @@
...
@@ -685,7 +693,7 @@
}
}
.content-wrapper
{
.content-wrapper
{
margin-top
:
$header-height
;
margin-top
:
0
;
padding-bottom
:
0
;
padding-bottom
:
0
;
}
}
...
@@ -709,11 +717,11 @@
...
@@ -709,11 +717,11 @@
.with-performance-bar
.ide.nav-only
{
.with-performance-bar
.ide.nav-only
{
.flash-container
{
.flash-container
{
margin-top
:
#{
$header-height
+
$performance-bar-height
}
;
margin-top
:
0
;
}
}
.content-wrapper
{
.content-wrapper
{
margin-top
:
#{
$header-height
+
$performance-bar-height
}
;
margin-top
:
0
;
padding-bottom
:
0
;
padding-bottom
:
0
;
}
}
...
@@ -722,10 +730,6 @@
...
@@ -722,10 +730,6 @@
}
}
&
.flash-shown
{
&
.flash-shown
{
.content-wrapper
{
margin-top
:
0
;
}
.ide-view
{
.ide-view
{
height
:
calc
(
100vh
-
#{
$header-height
+
$performance-bar-height
+
$flash-height
}
);
height
:
calc
(
100vh
-
#{
$header-height
+
$performance-bar-height
+
$flash-height
}
);
}
}
...
...
app/assets/stylesheets/pages/repo.scss.orig
0 → 100644
View file @
f8049f4e
This diff is collapsed.
Click to expand it.
app/controllers/admin/appearances_controller.rb
View file @
f8049f4e
...
@@ -50,9 +50,19 @@ class Admin::AppearancesController < Admin::ApplicationController
...
@@ -50,9 +50,19 @@ class Admin::AppearancesController < Admin::ApplicationController
# Only allow a trusted parameter "white list" through.
# Only allow a trusted parameter "white list" through.
def
appearance_params
def
appearance_params
params
.
require
(
:appearance
).
permit
(
params
.
require
(
:appearance
).
permit
(
allowed_appearance_params
)
:title
,
:description
,
:logo
,
:logo_cache
,
:header_logo
,
:header_logo_cache
,
end
:new_project_guidelines
,
:updated_by
)
def
allowed_appearance_params
%i[
title
description
logo
logo_cache
header_logo
header_logo_cache
new_project_guidelines
updated_by
]
end
end
end
end
app/helpers/appearances_helper.rb
View file @
f8049f4e
module
AppearancesHelper
module
AppearancesHelper
def
brand_title
def
brand_title
brand_item
&
.
title
.
presence
||
'GitLab Community Edition'
current_appearance
&
.
title
.
presence
||
'GitLab Community Edition'
end
end
def
brand_image
def
brand_image
image_tag
(
brand_item
.
logo
)
if
brand_item
&
.
logo?
image_tag
(
current_appearance
.
logo
)
if
current_appearance
&
.
logo?
end
end
def
brand_text
def
brand_text
markdown_field
(
brand_item
,
:description
)
markdown_field
(
current_appearance
,
:description
)
end
end
def
brand_new_project_guidelines
def
brand_new_project_guidelines
markdown_field
(
brand_item
,
:new_project_guidelines
)
markdown_field
(
current_appearance
,
:new_project_guidelines
)
end
end
def
brand_item
def
current_appearance
@appearance
||=
Appearance
.
current
@appearance
||=
Appearance
.
current
end
end
def
brand_header_logo
def
brand_header_logo
if
brand_item
&
.
header_logo?
if
current_appearance
&
.
header_logo?
image_tag
brand_item
.
header_logo
image_tag
current_appearance
.
header_logo
else
else
render
'shared/logo.svg'
render
'shared/logo.svg'
end
end
...
@@ -29,7 +29,7 @@ module AppearancesHelper
...
@@ -29,7 +29,7 @@ module AppearancesHelper
# Skip the 'GitLab' type logo when custom brand logo is set
# Skip the 'GitLab' type logo when custom brand logo is set
def
brand_header_logo_type
def
brand_header_logo_type
unless
brand_item
&
.
header_logo?
unless
current_appearance
&
.
header_logo?
render
'shared/logo_type.svg'
render
'shared/logo_type.svg'
end
end
end
end
...
...
app/helpers/application_helper.rb
View file @
f8049f4e
...
@@ -285,6 +285,10 @@ module ApplicationHelper
...
@@ -285,6 +285,10 @@ module ApplicationHelper
class_names
class_names
end
end
# EE feature: System header and footer, unavailable in CE
def
system_message_class
end
# Returns active css class when condition returns true
# Returns active css class when condition returns true
# otherwise returns nil.
# otherwise returns nil.
#
#
...
...
app/helpers/emails_helper.rb
View file @
f8049f4e
...
@@ -54,9 +54,9 @@ module EmailsHelper
...
@@ -54,9 +54,9 @@ module EmailsHelper
end
end
def
header_logo
def
header_logo
if
brand_item
&&
brand_item
.
header_logo?
if
current_appearance
&
.
header_logo?
image_tag
(
image_tag
(
brand_item
.
header_logo
,
current_appearance
.
header_logo
,
style:
'height: 50px'
style:
'height: 50px'
)
)
else
else
...
...
app/views/layouts/devise.html.haml
View file @
f8049f4e
!!! 5
!!! 5
%html
.devise-layout-html
%html
.devise-layout-html
{
class:
system_message_class
}
=
render
"layouts/head"
=
render
"layouts/head"
%body
.ui_indigo.login-page.application.navless
{
data:
{
page:
body_data_page
}
}
%body
.ui_indigo.login-page.application.navless
{
data:
{
page:
body_data_page
}
}
.page-wrap
.page-wrap
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
%h1
%h1
=
brand_title
=
brand_title
=
brand_image
=
brand_image
-
if
brand_item
&
.
description?
-
if
current_appearance
&
.
description?
=
brand_text
=
brand_text
-
else
-
else
%h3
Open source software to collaborate on code
%h3
Open source software to collaborate on code
...
...
app/views/layouts/devise_empty.html.haml
View file @
f8049f4e
!!! 5
!!! 5
%html
{
lang:
"en"
}
%html
{
lang:
"en"
,
class:
system_message_class
}
=
render
"layouts/head"
=
render
"layouts/head"
%body
.ui_indigo.login-page.application.navless
%body
.ui_indigo.login-page.application.navless
=
render
"layouts/header/empty"
=
render
"layouts/header/empty"
...
...
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