diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-08-19 12:08:42 +0300 |
commit | b76ae638462ab0f673e5915986070518dd3f9ad3 (patch) | |
tree | bdab0533383b52873be0ec0eb4d3c66598ff8b91 /app/views/search/show.html.haml | |
parent | 434373eabe7b4be9593d18a585fb763f1e5f1a6f (diff) |
Add latest changes from gitlab-org/gitlab@14-2-stable-eev14.2.0-rc42
Diffstat (limited to 'app/views/search/show.html.haml')
-rw-r--r-- | app/views/search/show.html.haml | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/app/views/search/show.html.haml b/app/views/search/show.html.haml index d54310bfa82..ab5ca0cd90f 100644 --- a/app/views/search/show.html.haml +++ b/app/views/search/show.html.haml @@ -5,10 +5,14 @@ = hidden_field_tag :group_id, params[:group_id] - if params[:project_id].present? = hidden_field_tag :project_id, params[:project_id] +- group_attributes = @group&.attributes&.slice('id', 'name')&.merge(full_name: @group&.full_name) - project_attributes = @project&.attributes&.slice('id', 'namespace_id', 'name')&.merge(name_with_namespace: @project&.name_with_namespace) - if @search_results - - page_description(_("%{count} %{scope} for term '%{term}'") % { count: @search_results.formatted_count(@scope), scope: @scope, term: @search_term }) + - if @without_count + - page_description(_("%{scope} results for term '%{term}'") % { scope: @scope, term: @search_term }) + - else + - page_description(_("%{count} %{scope} for term '%{term}'") % { count: @search_results.formatted_count(@scope), scope: @scope, term: @search_term }) - page_card_attributes("Namespace" => @group&.full_path, "Project" => @project&.full_path) .page-title-holder.d-flex.flex-wrap.justify-content-between @@ -16,7 +20,7 @@ = render_if_exists 'search/form_elasticsearch', attrs: { class: 'mb-2 mb-sm-0 align-self-center' } .gl-mt-3 - #js-search-topbar{ data: { "group-initial-data": @group.to_json, "project-initial-data": project_attributes.to_json } } + #js-search-topbar{ data: { "group-initial-data": group_attributes.to_json, "project-initial-data": project_attributes.to_json } } - if @search_term = render 'search/category' = render 'search/results' |