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

31 lines
1.3 KiB
Text
Raw Normal View History

2021-02-22 17:27:13 +05:30
- search_bar_classes = 'search-sidebar gl-display-flex gl-flex-direction-column gl-mr-4'
2019-02-15 15:39:39 +05:30
- if @search_objects.to_a.empty?
2021-03-11 19:13:27 +05:30
.gl-md-display-flex
2021-01-29 00:20:46 +05:30
- if %w(issues merge_requests).include?(@scope)
2021-02-22 17:27:13 +05:30
#js-search-sidebar{ class: search_bar_classes }
2021-09-04 01:27:46 +05:30
.gl-w-full.gl-flex-grow-1.gl-overflow-x-hidden
2021-01-29 00:20:46 +05:30
= render partial: "search/results/empty"
= render_if_exists 'shared/promotions/promote_advanced_search'
2015-09-11 14:41:01 +05:30
- else
2021-02-22 17:27:13 +05:30
= render partial: 'search/results_status', locals: { search_service: @search_service }
2019-09-04 21:01:54 +05:30
= render_if_exists 'shared/promotions/promote_advanced_search'
2020-11-24 15:15:51 +05:30
2021-03-11 19:13:27 +05:30
.results.gl-md-display-flex.gl-mt-3
2021-01-29 00:20:46 +05:30
- if %w(issues merge_requests).include?(@scope)
2021-02-22 17:27:13 +05:30
#js-search-sidebar{ class: search_bar_classes }
2021-09-04 01:27:46 +05:30
.gl-w-full.gl-flex-grow-1.gl-overflow-x-hidden
2021-01-29 00:20:46 +05:30
- 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
2014-09-02 18:07:02 +05:30
2021-01-29 00:20:46 +05:30
- if @scope != 'projects'
= paginate_collection(@search_objects)