2017-07-06 12:24:03 -04:00
|
|
|
- @hide_top_links = true
|
2015-04-30 13:06:18 -04:00
|
|
|
- page_title @search_term
|
2019-07-24 09:30:47 -04:00
|
|
|
- @hide_breadcrumbs = true
|
2021-01-22 04:08:53 -05: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]
|
|
|
|
- project_attributes = @project&.attributes&.slice('id', 'namespace_id', 'name')&.merge(name_with_namespace: @project&.name_with_namespace)
|
2019-07-24 09:30:47 -04:00
|
|
|
|
2020-08-11 11:10:08 -04:00
|
|
|
- if @search_results
|
|
|
|
- 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)
|
|
|
|
|
2020-10-05 14:08:51 -04: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 11:13:36 -05:00
|
|
|
|
2020-06-26 02:09:03 -04:00
|
|
|
.gl-mt-3
|
2021-02-12 04:08:48 -05:00
|
|
|
#js-search-topbar{ data: { "group-initial-data": @group.to_json, "project-initial-data": project_attributes.to_json } }
|
2015-04-28 05:48:42 -04:00
|
|
|
- if @search_term
|
2021-02-12 04:08:48 -05:00
|
|
|
= render 'search/category'
|
2015-04-28 15:04:19 -04:00
|
|
|
= render 'search/results'
|