2017-07-06 16:24:03 +00:00
|
|
|
- @hide_top_links = true
|
2015-04-30 17:06:18 +00:00
|
|
|
- page_title @search_term
|
2019-07-24 13:30:47 +00:00
|
|
|
- @hide_breadcrumbs = true
|
2021-01-22 09:08:53 +00:00
|
|
|
- if params[:group_id].present?
|
|
|
|
= hidden_field_tag :group_id, params[:group_id]
|
|
|
|
- if params[:project_id].present?
|
|
|
|
= hidden_field_tag :project_id, params[:project_id]
|
2021-08-05 06:09:25 +00:00
|
|
|
- group_attributes = @group&.attributes&.slice('id', 'name')&.merge(full_name: @group&.full_name)
|
2021-01-22 09:08:53 +00:00
|
|
|
- project_attributes = @project&.attributes&.slice('id', 'namespace_id', 'name')&.merge(name_with_namespace: @project&.name_with_namespace)
|
2019-07-24 13:30:47 +00:00
|
|
|
|
2020-08-11 15:10:08 +00:00
|
|
|
- if @search_results
|
2021-08-13 09:09:58 +00:00
|
|
|
- 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 })
|
2020-08-11 15:10:08 +00:00
|
|
|
- page_card_attributes("Namespace" => @group&.full_path, "Project" => @project&.full_path)
|
|
|
|
|
2020-10-05 18:08:51 +00:00
|
|
|
.page-title-holder.d-flex.flex-wrap.justify-content-between
|
|
|
|
%h1.page-title.mr-3= _('Search')
|
|
|
|
= render_if_exists 'search/form_elasticsearch', attrs: { class: 'mb-2 mb-sm-0 align-self-center' }
|
2016-01-13 16:13:36 +00:00
|
|
|
|
2020-06-26 06:09:03 +00:00
|
|
|
.gl-mt-3
|
2021-08-05 06:09:25 +00:00
|
|
|
#js-search-topbar{ data: { "group-initial-data": group_attributes.to_json, "project-initial-data": project_attributes.to_json } }
|
2015-04-28 09:48:42 +00:00
|
|
|
- if @search_term
|
2021-02-12 09:08:48 +00:00
|
|
|
= render 'search/category'
|
2015-04-28 19:04:19 +00:00
|
|
|
= render 'search/results'
|