diff options
Diffstat (limited to 'app/views/search/_results_list.html.haml')
-rw-r--r-- | app/views/search/_results_list.html.haml | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/app/views/search/_results_list.html.haml b/app/views/search/_results_list.html.haml index 7a57b5cc0fc..fcbf0ba4452 100644 --- a/app/views/search/_results_list.html.haml +++ b/app/views/search/_results_list.html.haml @@ -2,19 +2,22 @@ = render partial: "search/results/timeout" - elsif @search_results.respond_to?(:failed?) && @search_results.failed? = render partial: "search/results/error" -- elsif @search_objects.to_a.empty? +- elsif @search_objects.blank? = render partial: "search/results/empty" - else - - if @scope == 'commits' - %ul.content-list.commit-list - = render partial: "search/results/commit", collection: @search_objects - - else - .search-results.js-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 + - statusBarClass = !show_super_sidebar? ? 'gl-md-pl-5' : '' - - if @scope != 'projects' - = paginate_collection(@search_objects) + .section{ class: statusBarClass } + - if @scope == 'commits' + %ul.content-list.commit-list + = render partial: "search/results/commit", collection: @search_objects + - else + .search-results.js-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 + + - if @scope != 'projects' + = paginate_collection(@search_objects) |