2018-12-21 06:44:37 -05:00
|
|
|
- if @search_objects.to_a.empty?
|
2020-11-10 19:08:58 -05:00
|
|
|
= render partial: "search/results/filters"
|
|
|
|
= render partial: "search/results/empty"
|
|
|
|
= render_if_exists 'shared/promotions/promote_advanced_search'
|
2015-04-28 15:04:19 -04:00
|
|
|
- else
|
2020-10-26 08:08:44 -04:00
|
|
|
.search-results-status
|
|
|
|
.row-content-block.gl-display-flex
|
|
|
|
.gl-display-md-flex.gl-text-left.gl-align-items-center.gl-flex-grow-1
|
|
|
|
- unless @search_objects.is_a?(Kaminari::PaginatableWithoutCount)
|
|
|
|
= search_entries_info(@search_objects, @scope, @search_term)
|
|
|
|
- unless @show_snippets
|
|
|
|
- if @project
|
|
|
|
- link_to_project = link_to(@project.full_name, @project, class: 'ml-md-1')
|
|
|
|
- if @scope == 'blobs'
|
|
|
|
= s_("SearchCodeResults|in")
|
|
|
|
.mx-md-1
|
|
|
|
= render partial: "shared/ref_switcher", locals: { ref: repository_ref(@project), form_path: request.fullpath, field_name: 'repository_ref' }
|
|
|
|
= s_('SearchCodeResults|of %{link_to_project}').html_safe % { link_to_project: link_to_project }
|
|
|
|
- else
|
|
|
|
= _("in project %{link_to_project}").html_safe % { link_to_project: link_to_project }
|
|
|
|
- elsif @group
|
|
|
|
- link_to_group = link_to(@group.name, @group, class: 'ml-md-1')
|
|
|
|
= _("in group %{link_to_group}").html_safe % { link_to_group: link_to_group }
|
|
|
|
.gl-display-md-flex.gl-flex-direction-column
|
|
|
|
= render partial: 'search/sort_dropdown'
|
2019-05-29 22:31:07 -04:00
|
|
|
= render_if_exists 'shared/promotions/promote_advanced_search'
|
2020-11-10 19:08:58 -05:00
|
|
|
= render partial: "search/results/filters"
|
2020-09-03 17:08:18 -04:00
|
|
|
|
2020-11-10 19:08:58 -05:00
|
|
|
.results.gl-mt-3
|
|
|
|
- if @scope == 'commits'
|
|
|
|
%ul.content-list.commit-list
|
|
|
|
= render partial: "search/results/commit", collection: @search_objects
|
|
|
|
- else
|
|
|
|
.search-results
|
|
|
|
- if @scope == 'projects'
|
|
|
|
.term
|
|
|
|
= render 'shared/projects/list', projects: @search_objects, pipeline_status: false
|
|
|
|
- else
|
|
|
|
= render_if_exists partial: "search/results/#{@scope.singularize}", collection: @search_objects
|
2016-03-02 15:46:37 -05:00
|
|
|
|
2020-11-10 19:08:58 -05:00
|
|
|
- if @scope != 'projects'
|
|
|
|
= paginate_collection(@search_objects)
|