summaryrefslogtreecommitdiff
path: root/app/views/search/_results.html.haml
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/search/_results.html.haml')
-rw-r--r--app/views/search/_results.html.haml31
1 files changed, 7 insertions, 24 deletions
diff --git a/app/views/search/_results.html.haml b/app/views/search/_results.html.haml
index 855112bdba2..80d0253d273 100644
--- a/app/views/search/_results.html.haml
+++ b/app/views/search/_results.html.haml
@@ -1,37 +1,20 @@
+- search_bar_classes = 'search-sidebar gl-display-flex gl-flex-direction-column gl-mr-4'
+
- if @search_objects.to_a.empty?
.gl-display-md-flex
- if %w(issues merge_requests).include?(@scope)
- #js-search-sidebar.gl-display-flex.gl-flex-direction-column.col-md-3.gl-mr-4{ }
- .gl-w-full
+ #js-search-sidebar{ class: search_bar_classes }
+ .gl-w-full.gl-flex-fill-1.gl-overflow-x-hidden
= render partial: "search/results/empty"
= render_if_exists 'shared/promotions/promote_advanced_search'
- else
- .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'
+ = render partial: 'search/results_status', locals: { search_service: @search_service }
= render_if_exists 'shared/promotions/promote_advanced_search'
.results.gl-display-md-flex.gl-mt-3
- if %w(issues merge_requests).include?(@scope)
- #js-search-sidebar.gl-display-flex.gl-flex-direction-column.col-md-3.gl-mr-4{ }
- .gl-w-full
+ #js-search-sidebar{ class: search_bar_classes }
+ .gl-w-full.gl-flex-fill-1.gl-overflow-x-hidden
- if @scope == 'commits'
%ul.content-list.commit-list
= render partial: "search/results/commit", collection: @search_objects