BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
search_helper.rb
app/helpers/search_helper.rb
+2
-2
_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