Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-12-05 21:07:51 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-12-05 21:07:51 +0300
commit6a7cc8c14727f6fac64a5be6838764d8d5d41468 (patch)
tree97c8a3c2f180d26f0f8f0baaa3230352b8ef1efb /app/helpers
parent872319738757edc0483346c75a2407f7019b963f (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/gitlab_routing_helper.rb8
-rw-r--r--app/helpers/search_helper.rb7
2 files changed, 8 insertions, 7 deletions
diff --git a/app/helpers/gitlab_routing_helper.rb b/app/helpers/gitlab_routing_helper.rb
index 38ca12e6f90..3810041b2af 100644
--- a/app/helpers/gitlab_routing_helper.rb
+++ b/app/helpers/gitlab_routing_helper.rb
@@ -195,7 +195,7 @@ module GitlabRoutingHelper
end
def snippet_path(snippet, *args)
- if snippet.is_a?(ProjectSnippet)
+ if snippet.type == "ProjectSnippet"
application_url_helpers.project_snippet_path(snippet.project, snippet, *args)
else
new_args = snippet_query_params(snippet, *args)
@@ -204,7 +204,7 @@ module GitlabRoutingHelper
end
def snippet_url(snippet, *args)
- if snippet.is_a?(ProjectSnippet)
+ if snippet.type == "ProjectSnippet"
application_url_helpers.project_snippet_url(snippet.project, snippet, *args)
else
new_args = snippet_query_params(snippet, *args)
@@ -213,7 +213,7 @@ module GitlabRoutingHelper
end
def raw_snippet_path(snippet, *args)
- if snippet.is_a?(ProjectSnippet)
+ if snippet.type == "ProjectSnippet"
application_url_helpers.raw_project_snippet_path(snippet.project, snippet, *args)
else
new_args = snippet_query_params(snippet, *args)
@@ -222,7 +222,7 @@ module GitlabRoutingHelper
end
def raw_snippet_url(snippet, *args)
- if snippet.is_a?(ProjectSnippet)
+ if snippet.type == "ProjectSnippet"
application_url_helpers.raw_project_snippet_url(snippet.project, snippet, *args)
else
new_args = snippet_query_params(snippet, *args)
diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb
index 777fe82e4c0..a89fea4b7b8 100644
--- a/app/helpers/search_helper.rb
+++ b/app/helpers/search_helper.rb
@@ -31,13 +31,14 @@ module SearchHelper
from = collection.offset_value + 1
to = collection.offset_value + collection.to_a.size
count = collection.total_count
+ term_element = "<span>&nbsp;<code>#{h(term)}</code>&nbsp;</span>".html_safe
search_entries_info_template(collection) % {
from: from,
to: to,
count: count,
scope: search_entries_scope_label(scope, count),
- term: term
+ term_element: term_element
}
end
@@ -72,9 +73,9 @@ module SearchHelper
def search_entries_info_template(collection)
if collection.total_pages > 1
- s_("SearchResults|Showing %{from} - %{to} of %{count} %{scope} for \"%{term}\"")
+ s_("SearchResults|Showing %{from} - %{to} of %{count} %{scope} for%{term_element}").html_safe
else
- s_("SearchResults|Showing %{count} %{scope} for \"%{term}\"")
+ s_("SearchResults|Showing %{count} %{scope} for%{term_element}").html_safe
end
end