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
2d9d2e7a
Commit
2d9d2e7a
authored
Feb 04, 2016
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'better-search-autocomplete'
parents
b5befc73
70e44d63
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
CHANGELOG
CHANGELOG
+1
-0
app/helpers/search_helper.rb
app/helpers/search_helper.rb
+2
-2
No files found.
CHANGELOG
View file @
2d9d2e7a
...
...
@@ -29,6 +29,7 @@ v 8.5.0 (unreleased)
- Improve UI consistency between projects and groups lists
- Add sort dropdown to dashboard projects page
- Hide remove source branch button when the MR is merged but new commits are pushed (Zeger-Jan van de Weg)
- In seach autocomplete show only groups and projects you are member of
v 8.4.3
- Increase lfs_objects size column to 8-byte integer to allow files larger
...
...
app/helpers/search_helper.rb
View file @
2d9d2e7a
...
...
@@ -70,7 +70,7 @@ module SearchHelper
# Autocomplete results for the current user's groups
def
groups_autocomplete
(
term
,
limit
=
5
)
Group
.
search
(
term
).
limit
(
limit
).
map
do
|
group
|
current_user
.
authorized_groups
.
search
(
term
).
limit
(
limit
).
map
do
|
group
|
{
label:
"group:
#{
search_result_sanitize
(
group
.
name
)
}
"
,
url:
group_path
(
group
)
...
...
@@ -80,7 +80,7 @@ module SearchHelper
# Autocomplete results for the current user's projects
def
projects_autocomplete
(
term
,
limit
=
5
)
ProjectsFinder
.
new
.
execute
(
current_user
)
.
search_by_title
(
term
).
current_user
.
authorized_projects
.
search_by_title
(
term
).
sorted_by_stars
.
non_archived
.
limit
(
limit
).
map
do
|
p
|
{
label:
"project:
#{
search_result_sanitize
(
p
.
name_with_namespace
)
}
"
,
...
...
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