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
1ee5ce05
Commit
1ee5ce05
authored
Jul 04, 2017
by
kushalpandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make trial banner dismissiable using BS alert
parent
77ee0171
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
19 deletions
+14
-19
app/assets/stylesheets/framework/header.scss
app/assets/stylesheets/framework/header.scss
+7
-15
app/views/layouts/header/_default.html.haml
app/views/layouts/header/_default.html.haml
+7
-4
No files found.
app/assets/stylesheets/framework/header.scss
View file @
1ee5ce05
...
@@ -318,25 +318,17 @@ header {
...
@@ -318,25 +318,17 @@ header {
}
}
}
}
.gitlab-ee-trial-banner
{
.gitlab-ee-trial-banner.alert
{
padding
:
$gl-padding
;
text-align
:
center
;
text-align
:
center
;
p
{
p
a
{
margin
:
0
;
color
:
$gl-link-color
;
display
:
inline-block
;
text-decoration
:
none
;
a
{
font-weight
:
bold
;
font-weight
:
bold
;
}
}
.close-trial-banner
{
float
:
right
;
margin-top
:
2px
;
&
:hover
{
&
:hover
{
cursor
:
pointer
;
color
:
$gl-link-hover-color
;
text-decoration
:
underline
;
}
}
}
}
}
}
...
...
app/views/layouts/header/_default.html.haml
View file @
1ee5ce05
-
if
license_message
.
present?
-
if
license_message
.
present?
.gitlab-ee-trial-banner
.alert.alert-dismissible.gitlab-ee-trial-banner.js-gitlab-ee-trial-banner
{
role:
'alert'
}
%p
=
license_message
%button
.close
{
type:
'button'
,
'data-dismiss'
=>
'alert'
,
'aria-label'
=>
'Dismiss banner'
}
%button
.btn.btn-default.close.close-trial-banner.js-close-trial-banner
{
type:
'button'
,
'aria-label'
=>
'Dismiss banner'
}
=
icon
(
'times'
,
'aria-hidden'
=>
'true'
)
=
icon
(
'times'
,
'aria-hidden'
=>
'true'
)
%header
.navbar.navbar-gitlab
{
class:
"#{nav_header_class} #{ 'has-trial-banner' if trial_license_message.present?}"
}
%p
=
license_message
:javascript
$
(
'
.js-gitlab-ee-trial-banner
'
).
on
(
'
close.bs.alert
'
,
function
()
{
$
(
'
.js-navbar-gitlab
'
).
removeClass
(
'
has-trial-banner
'
);
});
%header
.navbar.navbar-gitlab.js-navbar-gitlab
{
class:
"#{nav_header_class} #{ 'has-trial-banner' if trial_license_message.present?}"
}
.navbar-border
.navbar-border
%a
.sr-only.gl-accessibility
{
href:
"#content-body"
,
tabindex:
"1"
}
Skip to content
%a
.sr-only.gl-accessibility
{
href:
"#content-body"
,
tabindex:
"1"
}
Skip to content
.container-fluid
.container-fluid
...
...
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