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
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
Hide 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,30 +13,35 @@
...
@@ -13,30 +13,35 @@
%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
session
[
:impersonator_id
]
-
if
current_user
%li
.impersonation
-
if
session
[
:impersonator_id
]
=
link_to
stop_impersonation_admin_users_path
,
method: :delete
,
title:
'Stop Impersonation'
,
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
%li
.impersonation
=
icon
(
'user-secret fw'
)
=
link_to
stop_impersonation_admin_users_path
,
method: :delete
,
title:
'Stop Impersonation'
,
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
-
if
current_user
.
is_admin?
=
icon
(
'user-secret fw'
)
-
if
current_user
.
is_admin?
%li
=
link_to
admin_root_path
,
title:
'Admin Area'
,
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
icon
(
'wrench fw'
)
%li
%li
=
link_to
admin_root_path
,
title:
'Admin Area'
,
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
link_to
dashboard_todos_path
,
title:
'Todos'
,
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
icon
(
'wrench fw'
)
%span
.badge.todos-pending-count
%li
=
todos_pending_count
=
link_to
dashboard_todos_path
,
title:
'Todos'
,
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
-
if
current_user
.
can_create_project?
%span
.badge.todos-pending-count
%li
=
todos_pending_count
=
link_to
new_project_path
,
title:
'New project'
,
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
-
if
current_user
.
can_create_project?
=
icon
(
'plus fw'
)
-
if
Gitlab
::
Sherlock
.
enabled?
%li
=
link_to
sherlock_transactions_path
,
title:
'Sherlock Transactions'
,
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
icon
(
'tachometer fw'
)
%li
%li
=
link_to
new_project_path
,
title:
'New project'
,
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
(
'plus fw'
)
=
icon
(
'sign-out'
)
-
if
Gitlab
::
Sherlock
.
enabled?
-
else
%li
.pull-right
=
link_to
sherlock_transactions_path
,
title:
'Sherlock Transactions'
,
=
link_to
"Sign in"
,
new_session_path
(
:user
,
redirect_to_referer:
'yes'
),
class:
'btn btn-sign-in btn-success'
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
icon
(
'tachometer fw'
)
%li
=
link_to
destroy_user_session_path
,
class:
'logout'
,
method: :delete
,
title:
'Sign out'
,
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
icon
(
'sign-out'
)
%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