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
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
Hide 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 @@
.right-sidebar
{
border-left
:
1px
solid
$border-color
;
height
:
calc
(
100%
-
#{
$header-height
}
);
}
.with-performance-bar
.right-sidebar.affix
{
...
...
app/assets/stylesheets/pages/issuable.scss
View file @
f8049f4e
...
...
@@ -522,10 +522,6 @@
.with-performance-bar
.right-sidebar
{
top
:
$header-height
+
$performance-bar-height
;
.issuable-sidebar
{
height
:
calc
(
100%
-
#{
$performance-bar-height
}
);
}
}
.sidebar-move-issue-confirmation-button
{
...
...
app/assets/stylesheets/pages/repo.scss
View file @
f8049f4e
...
...
@@ -19,7 +19,7 @@
.ide-view
{
display
:
flex
;
height
:
calc
(
100vh
-
#{
$header-height
}
);
margin-top
:
40px
;
margin-top
:
0
;
border-top
:
1px
solid
$white-dark
;
border-bottom
:
1px
solid
$white-dark
;
...
...
@@ -457,6 +457,8 @@
display
:
flex
;
flex-direction
:
column
;
flex
:
1
;
max-height
:
100%
;
overflow
:
auto
;
}
.multi-file-commit-empty-state-container
{
...
...
@@ -467,7 +469,7 @@
.multi-file-commit-panel-header
{
display
:
flex
;
align-items
:
center
;
margin-bottom
:
12px
;
margin-bottom
:
0
;
border-bottom
:
1px
solid
$white-dark
;
padding
:
$gl-btn-padding
0
;
...
...
@@ -674,8 +676,14 @@
overflow
:
hidden
;
&
.nav-only
{
padding-top
:
$header-height
;
.with-performance-bar
&
{
padding-top
:
$header-height
+
$performance-bar-height
;
}
.flash-container
{
margin-top
:
$header-height
;
margin-top
:
0
;
margin-bottom
:
0
;
}
...
...
@@ -685,7 +693,7 @@
}
.content-wrapper
{
margin-top
:
$header-height
;
margin-top
:
0
;
padding-bottom
:
0
;
}
...
...
@@ -709,11 +717,11 @@
.with-performance-bar
.ide.nav-only
{
.flash-container
{
margin-top
:
#{
$header-height
+
$performance-bar-height
}
;
margin-top
:
0
;
}
.content-wrapper
{
margin-top
:
#{
$header-height
+
$performance-bar-height
}
;
margin-top
:
0
;
padding-bottom
:
0
;
}
...
...
@@ -722,10 +730,6 @@
}
&
.flash-shown
{
.content-wrapper
{
margin-top
:
0
;
}
.ide-view
{
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
# Only allow a trusted parameter "white list" through.
def
appearance_params
params
.
require
(
:appearance
).
permit
(
:title
,
:description
,
:logo
,
:logo_cache
,
:header_logo
,
:header_logo_cache
,
:new_project_guidelines
,
:updated_by
)
params
.
require
(
:appearance
).
permit
(
allowed_appearance_params
)
end
def
allowed_appearance_params
%i[
title
description
logo
logo_cache
header_logo
header_logo_cache
new_project_guidelines
updated_by
]
end
end
app/helpers/appearances_helper.rb
View file @
f8049f4e
module
AppearancesHelper
def
brand_title
brand_item
&
.
title
.
presence
||
'GitLab Community Edition'
current_appearance
&
.
title
.
presence
||
'GitLab Community Edition'
end
def
brand_image
image_tag
(
brand_item
.
logo
)
if
brand_item
&
.
logo?
image_tag
(
current_appearance
.
logo
)
if
current_appearance
&
.
logo?
end
def
brand_text
markdown_field
(
brand_item
,
:description
)
markdown_field
(
current_appearance
,
:description
)
end
def
brand_new_project_guidelines
markdown_field
(
brand_item
,
:new_project_guidelines
)
markdown_field
(
current_appearance
,
:new_project_guidelines
)
end
def
brand_item
def
current_appearance
@appearance
||=
Appearance
.
current
end
def
brand_header_logo
if
brand_item
&
.
header_logo?
image_tag
brand_item
.
header_logo
if
current_appearance
&
.
header_logo?
image_tag
current_appearance
.
header_logo
else
render
'shared/logo.svg'
end
...
...
@@ -29,7 +29,7 @@ module AppearancesHelper
# Skip the 'GitLab' type logo when custom brand logo is set
def
brand_header_logo_type
unless
brand_item
&
.
header_logo?
unless
current_appearance
&
.
header_logo?
render
'shared/logo_type.svg'
end
end
...
...
app/helpers/application_helper.rb
View file @
f8049f4e
...
...
@@ -285,6 +285,10 @@ module ApplicationHelper
class_names
end
# EE feature: System header and footer, unavailable in CE
def
system_message_class
end
# Returns active css class when condition returns true
# otherwise returns nil.
#
...
...
app/helpers/emails_helper.rb
View file @
f8049f4e
...
...
@@ -54,9 +54,9 @@ module EmailsHelper
end
def
header_logo
if
brand_item
&&
brand_item
.
header_logo?
if
current_appearance
&
.
header_logo?
image_tag
(
brand_item
.
header_logo
,
current_appearance
.
header_logo
,
style:
'height: 50px'
)
else
...
...
app/views/layouts/devise.html.haml
View file @
f8049f4e
!!! 5
%html
.devise-layout-html
%html
.devise-layout-html
{
class:
system_message_class
}
=
render
"layouts/head"
%body
.ui_indigo.login-page.application.navless
{
data:
{
page:
body_data_page
}
}
.page-wrap
...
...
@@ -16,7 +16,7 @@
%h1
=
brand_title
=
brand_image
-
if
brand_item
&
.
description?
-
if
current_appearance
&
.
description?
=
brand_text
-
else
%h3
Open source software to collaborate on code
...
...
app/views/layouts/devise_empty.html.haml
View file @
f8049f4e
!!! 5
%html
{
lang:
"en"
}
%html
{
lang:
"en"
,
class:
system_message_class
}
=
render
"layouts/head"
%body
.ui_indigo.login-page.application.navless
=
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