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
Kazuhiko Shiozaki
gitlab-ce
Commits
a43a3803
Commit
a43a3803
authored
Aug 07, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Increase amount of search results for issues, mr, projects
parent
b58eeeaf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
5 deletions
+3
-5
app/contexts/search_context.rb
app/contexts/search_context.rb
+3
-3
app/views/shared/_issues.html.haml
app/views/shared/_issues.html.haml
+0
-1
app/views/shared/_merge_requests.html.haml
app/views/shared/_merge_requests.html.haml
+0
-1
No files found.
app/contexts/search_context.rb
View file @
a43a3803
...
...
@@ -11,7 +11,7 @@ class SearchContext
return
result
unless
query
.
present?
projects
=
Project
.
where
(
id:
project_ids
)
result
[
:projects
]
=
projects
.
search
(
query
).
limit
(
1
0
)
result
[
:projects
]
=
projects
.
search
(
query
).
limit
(
2
0
)
# Search inside singe project
project
=
projects
.
first
if
projects
.
length
==
1
...
...
@@ -19,8 +19,8 @@ class SearchContext
if
params
[
:search_code
].
present?
result
[
:blobs
]
=
project
.
repository
.
search_files
(
query
,
params
[
:repository_ref
])
unless
project
.
empty_repo?
else
result
[
:merge_requests
]
=
MergeRequest
.
where
(
project_id:
project_ids
).
search
(
query
).
limit
(
1
0
)
result
[
:issues
]
=
Issue
.
where
(
project_id:
project_ids
).
search
(
query
).
limit
(
1
0
)
result
[
:merge_requests
]
=
MergeRequest
.
where
(
project_id:
project_ids
).
search
(
query
).
limit
(
2
0
)
result
[
:issues
]
=
Issue
.
where
(
project_id:
project_ids
).
search
(
query
).
limit
(
2
0
)
result
[
:wiki_pages
]
=
[]
end
result
...
...
app/views/shared/_issues.html.haml
View file @
a43a3803
...
...
@@ -9,7 +9,6 @@
%ul
.well-list.issues-list
-
group
[
1
].
each
do
|
issue
|
=
render
'projects/issues/issue'
,
issue:
issue
%hr
=
paginate
@issues
,
theme:
"gitlab"
-
else
%p
.nothing_here_message
Nothing to show here
...
...
app/views/shared/_merge_requests.html.haml
View file @
a43a3803
...
...
@@ -7,7 +7,6 @@
%ul
.well-list.mr-list
-
group
[
1
].
each
do
|
merge_request
|
=
render
'projects/merge_requests/merge_request'
,
merge_request:
merge_request
%hr
=
paginate
@merge_requests
,
theme:
"gitlab"
-
else
...
...
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