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
Boxiang Sun
gitlab-ce
Commits
4ad47e41
Commit
4ad47e41
authored
Sep 05, 2018
by
George Tsiolis
Committed by
Phil Hughes
Sep 05, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Limit navbar search for current project or group for small viewports
parent
623ef392
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
10 deletions
+20
-10
app/views/layouts/application.html.haml
app/views/layouts/application.html.haml
+1
-1
app/views/layouts/fullscreen.html.haml
app/views/layouts/fullscreen.html.haml
+1
-1
app/views/layouts/header/_default.html.haml
app/views/layouts/header/_default.html.haml
+13
-8
changelogs/unreleased/limit-navbar-search-for-current-project-or-group-for-small-viewports.yml
...arch-for-current-project-or-group-for-small-viewports.yml
+5
-0
No files found.
app/views/layouts/application.html.haml
View file @
4ad47e41
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
%body
{
class:
"#{user_application_theme} #{@body_class}"
,
data:
{
page:
body_data_page
,
project:
"#{@project.path if @project}"
,
group:
"#{@group.path if @group}"
,
find_file:
find_file_path
}
}
%body
{
class:
"#{user_application_theme} #{@body_class}"
,
data:
{
page:
body_data_page
,
project:
"#{@project.path if @project}"
,
group:
"#{@group.path if @group}"
,
find_file:
find_file_path
}
}
=
render
"layouts/init_auto_complete"
if
@gfm_form
=
render
"layouts/init_auto_complete"
if
@gfm_form
=
render
'peek/bar'
=
render
'peek/bar'
=
render
"layouts/header/default"
=
render
partial:
"layouts/header/default"
,
locals:
{
project:
@project
,
group:
@group
}
=
render
'layouts/page'
,
sidebar:
sidebar
,
nav:
nav
=
render
'layouts/page'
,
sidebar:
sidebar
,
nav:
nav
=
yield
:scripts_body
=
yield
:scripts_body
app/views/layouts/fullscreen.html.haml
View file @
4ad47e41
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
=
render
"layouts/head"
=
render
"layouts/head"
%body
{
class:
"#{user_application_theme} #{@body_class} fullscreen-layout"
,
data:
{
page:
body_data_page
}
}
%body
{
class:
"#{user_application_theme} #{@body_class} fullscreen-layout"
,
data:
{
page:
body_data_page
}
}
=
render
'peek/bar'
=
render
'peek/bar'
=
render
"layouts/header/default"
=
render
partial:
"layouts/header/default"
,
locals:
{
project:
@project
,
group:
@group
}
=
render
'shared/outdated_browser'
=
render
'shared/outdated_browser'
.mobile-overlay
.mobile-overlay
.alert-wrapper
.alert-wrapper
...
...
app/views/layouts/header/_default.html.haml
View file @
4ad47e41
-
if
project
-
search_path_url
=
search_path
(
project_id:
project
.
id
)
-
elsif
group
-
search_path_url
=
search_path
(
group_id:
group
.
id
)
-
else
-
search_path_url
=
search_path
%header
.navbar.navbar-gitlab.qa-navbar.navbar-expand-sm
%header
.navbar.navbar-gitlab.qa-navbar.navbar-expand-sm
%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
...
@@ -24,26 +31,25 @@
...
@@ -24,26 +31,25 @@
%li
.nav-item.d-none.d-sm-none.d-md-block.m-auto
%li
.nav-item.d-none.d-sm-none.d-md-block.m-auto
=
render
'layouts/search'
unless
current_controller?
(
:search
)
=
render
'layouts/search'
unless
current_controller?
(
:search
)
%li
.nav-item.d-inline-block.d-sm-none.d-md-none
%li
.nav-item.d-inline-block.d-sm-none.d-md-none
=
link_to
search_path
,
title:
_
(
'Search'
),
aria:
{
label:
_
(
"Search"
)
},
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
link_to
search_path
_url
,
title:
_
(
'Search'
),
aria:
{
label:
_
(
'Search'
)
},
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
sprite_icon
(
'search'
,
size:
16
)
=
sprite_icon
(
'search'
,
size:
16
)
-
if
header_link?
(
:issues
)
-
if
header_link?
(
:issues
)
=
nav_link
(
path:
'dashboard#issues'
,
html_options:
{
class:
"user-counter"
})
do
=
nav_link
(
path:
'dashboard#issues'
,
html_options:
{
class:
"user-counter"
})
do
=
link_to
assigned_issues_dashboard_path
,
title:
_
(
'Issues'
),
class:
'dashboard-shortcuts-issues'
,
aria:
{
label:
_
(
"Issues"
)
},
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
link_to
assigned_issues_dashboard_path
,
title:
_
(
'Issues'
),
class:
'dashboard-shortcuts-issues'
,
aria:
{
label:
_
(
'Issues'
)
},
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
sprite_icon
(
'issues'
,
size:
16
)
=
sprite_icon
(
'issues'
,
size:
16
)
-
issues_count
=
assigned_issuables_count
(
:issues
)
-
issues_count
=
assigned_issuables_count
(
:issues
)
%span
.badge.badge-pill.issues-count
{
class:
(
'hidden'
if
issues_count
.
zero?
)
}
%span
.badge.badge-pill.issues-count
{
class:
(
'hidden'
if
issues_count
.
zero?
)
}
=
number_with_delimiter
(
issues_count
)
=
number_with_delimiter
(
issues_count
)
-
if
header_link?
(
:merge_requests
)
-
if
header_link?
(
:merge_requests
)
=
nav_link
(
path:
'dashboard#merge_requests'
,
html_options:
{
class:
"user-counter"
})
do
=
nav_link
(
path:
'dashboard#merge_requests'
,
html_options:
{
class:
"user-counter"
})
do
=
link_to
assigned_mrs_dashboard_path
,
title:
_
(
'Merge requests'
),
class:
'dashboard-shortcuts-merge_requests'
,
aria:
{
label:
_
(
"Merge requests"
)
},
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
link_to
assigned_mrs_dashboard_path
,
title:
_
(
'Merge requests'
),
class:
'dashboard-shortcuts-merge_requests'
,
aria:
{
label:
_
(
'Merge requests'
)
},
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
sprite_icon
(
'git-merge'
,
size:
16
)
=
sprite_icon
(
'git-merge'
,
size:
16
)
-
merge_requests_count
=
assigned_issuables_count
(
:merge_requests
)
-
merge_requests_count
=
assigned_issuables_count
(
:merge_requests
)
%span
.badge.badge-pill.merge-requests-count
{
class:
(
'hidden'
if
merge_requests_count
.
zero?
)
}
%span
.badge.badge-pill.merge-requests-count
{
class:
(
'hidden'
if
merge_requests_count
.
zero?
)
}
=
number_with_delimiter
(
merge_requests_count
)
=
number_with_delimiter
(
merge_requests_count
)
-
if
header_link?
(
:todos
)
-
if
header_link?
(
:todos
)
=
nav_link
(
controller:
'dashboard/todos'
,
html_options:
{
class:
"user-counter"
})
do
=
nav_link
(
controller:
'dashboard/todos'
,
html_options:
{
class:
"user-counter"
})
do
=
link_to
dashboard_todos_path
,
title:
_
(
'Todos'
),
aria:
{
label:
_
(
"Todos"
)
},
class:
'shortcuts-todos'
,
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
link_to
dashboard_todos_path
,
title:
_
(
'Todos'
),
aria:
{
label:
_
(
'Todos'
)
},
class:
'shortcuts-todos'
,
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
sprite_icon
(
'todo-done'
,
size:
16
)
=
sprite_icon
(
'todo-done'
,
size:
16
)
%span
.badge.badge-pill.todos-count
{
class:
(
'hidden'
if
todos_pending_count
.
zero?
)
}
%span
.badge.badge-pill.todos-count
{
class:
(
'hidden'
if
todos_pending_count
.
zero?
)
}
=
todos_count_format
(
todos_pending_count
)
=
todos_count_format
(
todos_pending_count
)
...
@@ -56,7 +62,7 @@
...
@@ -56,7 +62,7 @@
=
render
'layouts/header/current_user_dropdown'
=
render
'layouts/header/current_user_dropdown'
-
if
header_link?
(
:admin_impersonation
)
-
if
header_link?
(
:admin_impersonation
)
%li
.nav-item.impersonation
%li
.nav-item.impersonation
=
link_to
admin_impersonation_path
,
class:
'nav-link impersonation-btn'
,
method: :delete
,
title:
_
(
"Stop impersonation"
),
aria:
{
label:
_
(
'Stop impersonation'
)
},
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
link_to
admin_impersonation_path
,
class:
'nav-link impersonation-btn'
,
method: :delete
,
title:
_
(
'Stop impersonation'
),
aria:
{
label:
_
(
'Stop impersonation'
)
},
data:
{
toggle:
'tooltip'
,
placement:
'bottom'
,
container:
'body'
}
do
=
icon
(
'user-secret'
)
=
icon
(
'user-secret'
)
-
if
header_link?
(
:sign_in
)
-
if
header_link?
(
:sign_in
)
%li
.nav-item
%li
.nav-item
...
@@ -64,8 +70,7 @@
...
@@ -64,8 +70,7 @@
-
sign_in_text
=
allow_signup?
?
_
(
'Sign in / Register'
)
:
_
(
'Sign in'
)
-
sign_in_text
=
allow_signup?
?
_
(
'Sign in / Register'
)
:
_
(
'Sign in'
)
=
link_to
sign_in_text
,
new_session_path
(
:user
,
redirect_to_referer:
'yes'
),
class:
'btn btn-sign-in'
=
link_to
sign_in_text
,
new_session_path
(
:user
,
redirect_to_referer:
'yes'
),
class:
'btn btn-sign-in'
%button
.navbar-toggler.d-block.d-sm-none
{
type:
'button'
}
%button
.navbar-toggler.d-block.d-sm-none
{
type:
'button'
}
%span
.sr-only
=
_
(
"Toggle navigation"
)
%span
.sr-only
=
_
(
'Toggle navigation'
)
=
sprite_icon
(
'ellipsis_h'
,
size:
12
,
css_class:
'more-icon js-navbar-toggle-right'
)
=
sprite_icon
(
'ellipsis_h'
,
size:
12
,
css_class:
'more-icon js-navbar-toggle-right'
)
=
sprite_icon
(
'close'
,
size:
12
,
css_class:
'close-icon js-navbar-toggle-left'
)
=
sprite_icon
(
'close'
,
size:
12
,
css_class:
'close-icon js-navbar-toggle-left'
)
changelogs/unreleased/limit-navbar-search-for-current-project-or-group-for-small-viewports.yml
0 → 100644
View file @
4ad47e41
---
title
:
Limit navbar search for current project or group for small viewports
merge_request
:
18634
author
:
George Tsiolis
type
:
changed
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