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
Léo-Paul Géneau
gitlab-ce
Commits
262a3dd4
Commit
262a3dd4
authored
Apr 15, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Humanize scope text
parent
3b5879e5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
app/helpers/search_helper.rb
app/helpers/search_helper.rb
+2
-2
app/views/search/_results.html.haml
app/views/search/_results.html.haml
+1
-1
No files found.
app/helpers/search_helper.rb
View file @
262a3dd4
...
...
@@ -19,13 +19,13 @@ module SearchHelper
end
end
def
search_entries_info
(
collection
)
def
search_entries_info
(
collection
,
scope
,
term
)
if
collection
.
count
>
0
from
=
collection
.
offset_value
+
1
to
=
collection
.
offset_value
+
collection
.
length
count
=
collection
.
count
"Showing
#{
from
}
-
#{
to
}
of
#{
count
}
results for
\"
#{
@search_
term
}
\"
"
"Showing
#{
from
}
-
#{
to
}
of
#{
count
}
#{
scope
.
humanize
(
capitalize:
false
)
}
for
\"
#{
term
}
\"
"
end
end
...
...
app/views/search/_results.html.haml
View file @
262a3dd4
...
...
@@ -2,7 +2,7 @@
=
render
partial:
"search/results/empty"
-
else
.gray-content-block
=
search_entries_info
@objects
=
search_entries_info
@objects
,
@scope
,
@search_term
-
unless
@show_snippets
-
if
@project
in project
#{
link_to
@project
.
name_with_namespace
,
[
@project
.
namespace
.
becomes
(
Namespace
),
@project
]
}
...
...
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