diff options
author | Phil Hughes <me@iamphill.com> | 2016-04-26 09:02:28 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-04-26 09:04:35 +0100 |
commit | 97c1a1ef64cdce75afa24075ea77333e76c9ccbf (patch) | |
tree | 54e960093847aee8af2d865b461941b0c8b482e7 /app/helpers/search_helper.rb | |
parent | 7ee5de19804842033c3cfdc2bf1209c27adcd7b7 (diff) | |
download | gitlab-ce-97c1a1ef64cdce75afa24075ea77333e76c9ccbf.tar.gz |
Updated based on feedbacksearch-ui-update
Changed some variable names
Fixed CHANGELOG entry
Diffstat (limited to 'app/helpers/search_helper.rb')
-rw-r--r-- | app/helpers/search_helper.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb index 7f585cd5dd9..24c4c098c65 100644 --- a/app/helpers/search_helper.rb +++ b/app/helpers/search_helper.rb @@ -20,13 +20,13 @@ module SearchHelper end def search_entries_info(collection, scope, term) - if collection.count > 0 - from = collection.offset_value + 1 - to = collection.offset_value + collection.length - count = collection.total_count + return unless collection.count > 0 - "Showing #{from} - #{to} of #{count} #{scope.humanize(capitalize: false)} for \"#{term}\"" - end + from = collection.offset_value + 1 + to = collection.offset_value + collection.length + count = collection.total_count + + "Showing #{from} - #{to} of #{count} #{scope.humanize(capitalize: false)} for \"#{term}\"" end private |