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
iv
gitlab-ce
Commits
e06fe6b7
Commit
e06fe6b7
authored
Aug 27, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make search bar on search page more noticeable
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
dcdf214f
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
12 deletions
+22
-12
app/assets/stylesheets/pages/search.scss
app/assets/stylesheets/pages/search.scss
+12
-0
app/views/search/_filter.html.haml
app/views/search/_filter.html.haml
+2
-4
app/views/search/_form.html.haml
app/views/search/_form.html.haml
+7
-5
app/views/search/_results.html.haml
app/views/search/_results.html.haml
+1
-2
app/views/search/show.html.haml
app/views/search/show.html.haml
+0
-1
No files found.
app/assets/stylesheets/pages/search.scss
View file @
e06fe6b7
...
@@ -5,3 +5,15 @@
...
@@ -5,3 +5,15 @@
margin-bottom
:
15px
;
margin-bottom
:
15px
;
}
}
}
}
.search-holder
{
max-width
:
600px
;
margin
:
0
auto
;
margin-bottom
:
20px
;
input
{
border-color
:
#BBB
;
font-weight
:
bold
;
}
}
app/views/search/_filter.html.haml
View file @
e06fe6b7
.dropdown.inline
.dropdown.inline
%button
.dropdown-toggle.btn.btn
{
type:
'button'
,
'data-toggle'
=>
'dropdown'
}
%button
.dropdown-toggle.btn.btn-sm
{
type:
'button'
,
'data-toggle'
=>
'dropdown'
}
%i
.fa.fa-tags
%span
.light
Group:
%span
.light
Group:
-
if
@group
.
present?
-
if
@group
.
present?
%strong
=
@group
.
name
%strong
=
@group
.
name
...
@@ -17,8 +16,7 @@
...
@@ -17,8 +16,7 @@
=
group
.
name
=
group
.
name
.dropdown.inline.prepend-left-10.project-filter
.dropdown.inline.prepend-left-10.project-filter
%button
.dropdown-toggle.btn.btn
{
type:
'button'
,
'data-toggle'
=>
'dropdown'
}
%button
.dropdown-toggle.btn.btn-sm
{
type:
'button'
,
'data-toggle'
=>
'dropdown'
}
%i
.fa.fa-tags
%span
.light
Project:
%span
.light
Project:
-
if
@project
.
present?
-
if
@project
.
present?
%strong
=
@project
.
name_with_namespace
%strong
=
@project
.
name_with_namespace
...
...
app/views/search/_form.html.haml
View file @
e06fe6b7
=
form_tag
search_path
,
method: :get
,
class:
'form-inline'
do
|
f
|
=
form_tag
search_path
,
method: :get
do
|
f
|
=
hidden_field_tag
:project_id
,
params
[
:project_id
]
=
hidden_field_tag
:project_id
,
params
[
:project_id
]
=
hidden_field_tag
:group_id
,
params
[
:group_id
]
=
hidden_field_tag
:group_id
,
params
[
:group_id
]
=
hidden_field_tag
:snippets
,
params
[
:snippets
]
=
hidden_field_tag
:snippets
,
params
[
:snippets
]
=
hidden_field_tag
:scope
,
params
[
:scope
]
=
hidden_field_tag
:scope
,
params
[
:scope
]
.search-holder.clearfix
.search-holder.clearfix
.
form
-group
.
input
-group
=
search_field_tag
:search
,
params
[
:search
],
placeholder:
"Search for projects, issues etc"
,
class:
"form-control search-text-input"
,
id:
"dashboard_search"
,
autofocus:
true
=
search_field_tag
:search
,
params
[
:search
],
placeholder:
"Search for projects, issues etc"
,
class:
"form-control search-text-input"
,
id:
"dashboard_search"
,
autofocus:
true
%span
.input-group-btn
=
button_tag
'Search'
,
class:
"btn btn-primary"
=
button_tag
'Search'
,
class:
"btn btn-primary"
-
unless
params
[
:snippets
].
eql?
'true'
-
unless
params
[
:snippets
].
eql?
'true'
.pull-right
%br
=
render
'filter'
=
render
'filter'
app/views/search/_results.html.haml
View file @
e06fe6b7
-
if
@search_results
.
empty?
-
if
@search_results
.
empty?
=
render
partial:
"search/results/empty"
=
render
partial:
"search/results/empty"
-
else
-
else
.light
%p
.light
Search results for
Search results for
%code
%code
=
@search_term
=
@search_term
...
@@ -11,7 +11,6 @@
...
@@ -11,7 +11,6 @@
-
elsif
@group
-
elsif
@group
in group
#{
link_to
@group
.
name
,
@group
}
in group
#{
link_to
@group
.
name
,
@group
}
%br
.results.prepend-top-10
.results.prepend-top-10
.search-results
.search-results
-
if
@scope
==
'projects'
-
if
@scope
==
'projects'
...
...
app/views/search/show.html.haml
View file @
e06fe6b7
-
page_title
@search_term
-
page_title
@search_term
=
render
'search/form'
=
render
'search/form'
%br
-
if
@search_term
-
if
@search_term
=
render
'search/category'
=
render
'search/category'
=
render
'search/results'
=
render
'search/results'
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