debian-mirror-gitlab/app/views/search/show.html.haml

27 lines
1.3 KiB
Text
Raw Normal View History

2017-09-10 17:25:29 +05:30
- @hide_top_links = true
2015-09-11 14:41:01 +05:30
- page_title @search_term
2019-10-12 21:52:04 +05:30
- @hide_breadcrumbs = true
2021-03-11 19:13:27 +05:30
- 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-10-27 15:23:28 +05:30
- group_attributes = @group&.attributes&.slice('id', 'name')&.merge(full_name: @group&.full_name)
2021-03-11 19:13:27 +05:30
- project_attributes = @project&.attributes&.slice('id', 'namespace_id', 'name')&.merge(name_with_namespace: @project&.name_with_namespace)
2019-10-12 21:52:04 +05:30
2020-10-24 23:57:45 +05:30
- if @search_results
2021-10-27 15:23:28 +05:30
- 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-10-24 23:57:45 +05:30
- page_card_attributes("Namespace" => @group&.full_path, "Project" => @project&.full_path)
2021-01-03 14:25:43 +05:30
.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' }
2020-07-28 23:09:34 +05:30
.gl-mt-3
2021-10-27 15:23:28 +05:30
#js-search-topbar{ data: { "group-initial-data": group_attributes.to_json, "project-initial-data": project_attributes.to_json } }
2015-09-11 14:41:01 +05:30
- if @search_term
= render 'search/category'
= render 'search/results'