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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
4c8721b2
Commit
4c8721b2
authored
Mar 01, 2016
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor UI header for logged out users
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
b4c842b3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
47 deletions
+28
-47
app/views/layouts/application.html.haml
app/views/layouts/application.html.haml
+1
-5
app/views/layouts/header/_default.html.haml
app/views/layouts/header/_default.html.haml
+27
-22
app/views/layouts/header/_public.html.haml
app/views/layouts/header/_public.html.haml
+0
-20
No files found.
app/views/layouts/application.html.haml
View file @
4c8721b2
...
@@ -5,11 +5,7 @@
...
@@ -5,11 +5,7 @@
-# Ideally this would be inside the head, but turbolinks only evaluates page-specific JS in the body.
-# Ideally this would be inside the head, but turbolinks only evaluates page-specific JS in the body.
=
yield
:scripts_body_top
=
yield
:scripts_body_top
-
if
current_user
=
render
"layouts/header/default"
,
title:
header_title
=
render
"layouts/header/default"
,
title:
header_title
-
else
=
render
"layouts/header/public"
,
title:
header_title
=
render
'layouts/page'
,
sidebar:
sidebar
=
render
'layouts/page'
,
sidebar:
sidebar
=
yield
:scripts_body
=
yield
:scripts_body
app/views/layouts/header/_default.html.haml
View file @
4c8721b2
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
%li
.visible-sm.visible-xs
%li
.visible-sm.visible-xs
=
link_to
search_path
,
title:
'Search'
,
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
link_to
search_path
,
title:
'Search'
,
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
icon
(
'search'
)
=
icon
(
'search'
)
-
if
current_user
-
if
session
[
:impersonator_id
]
-
if
session
[
:impersonator_id
]
%li
.impersonation
%li
.impersonation
=
link_to
stop_impersonation_admin_users_path
,
method: :delete
,
title:
'Stop Impersonation'
,
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
link_to
stop_impersonation_admin_users_path
,
method: :delete
,
title:
'Stop Impersonation'
,
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
...
@@ -37,6 +38,10 @@
...
@@ -37,6 +38,10 @@
%li
%li
=
link_to
destroy_user_session_path
,
class:
'logout'
,
method: :delete
,
title:
'Sign out'
,
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
link_to
destroy_user_session_path
,
class:
'logout'
,
method: :delete
,
title:
'Sign out'
,
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
icon
(
'sign-out'
)
=
icon
(
'sign-out'
)
-
else
.pull-right
=
link_to
"Sign in"
,
new_session_path
(
:user
,
redirect_to_referer:
'yes'
),
class:
'btn btn-sign-in btn-success'
%h1
.title
=
title
%h1
.title
=
title
...
...
app/views/layouts/header/_public.html.haml
deleted
100644 → 0
View file @
b4c842b3
%header
.navbar.navbar-fixed-top.navbar-gitlab
{
class:
nav_header_class
}
%div
{
class:
fluid_layout
?
"container-fluid"
:
"container-fluid"
}
.header-content
-
unless
current_controller?
(
'sessions'
)
.pull-right
=
link_to
"Sign in"
,
new_session_path
(
:user
,
redirect_to_referer:
'yes'
),
class:
'btn btn-sign-in btn-success'
.navbar-collapse.collapse
%ul
.nav.navbar-nav.pull-right
-
unless
@disable_search_panel
%li
.hidden-sm.hidden-xs
=
render
'layouts/search'
%li
.visible-sm.visible-xs
=
link_to
search_path
,
title:
'Search'
,
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
icon
(
'search'
)
%h1
.title
=
title
=
render
'shared/outdated_browser'
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