BigW Consortium Gitlab

Fix project search showing always no results if no merge requests matches

parent bdb9340e
...@@ -15,10 +15,10 @@ ...@@ -15,10 +15,10 @@
- else - else
= render partial: "search/results/empty", :locals => { message: "We couldn't find any matching code" } = render partial: "search/results/empty", :locals => { message: "We couldn't find any matching code" }
- else - else
- if (@search_results[:merge_requests] || @search_results[:issues] || @search_results[:notes]).length > 0 - if @search_results[:merge_requests].present? || @search_results[:issues].present? || @search_results[:notes].present?
%ul.bordered-list %ul.bordered-list
= render partial: "search/results/merge_request", collection: @search_results[:merge_requests] = render partial: "search/results/merge_request", collection: @search_results[:merge_requests]
= render partial: "search/results/issue", collection: @search_results[:issues] = render partial: "search/results/issue", collection: @search_results[:issues]
= render partial: "search/results/note", collection: @search_results[:notes] = render partial: "search/results/note", collection: @search_results[:notes]
- else - else
= render partial: "search/results/empty", :locals => { message: "We couldn't find any issues, merge requests or notes" } = render partial: "search/results/empty", locals: { message: "We couldn't find any issues, merge requests or notes" }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment