diff --git a/app/views/bubbles/index.html.erb b/app/views/bubbles/index.html.erb index 8330554e3..f14cd107e 100644 --- a/app/views/bubbles/index.html.erb +++ b/app/views/bubbles/index.html.erb @@ -19,7 +19,7 @@ <% elsif @filter.buckets.one? %> <%= @filter.buckets.first.name %> <% else %> - <%= pluralize(@filter.buckets.size, "project") %> + <%= @filter.buckets.map(&:name).to_sentence %> <% end %> <%= render "bubbles/filters", filter: @filter %> @@ -47,16 +47,20 @@

Considering

- <%= render partial: "bubbles/card_mini", collection: @bubbles.where(stage: [@filter.buckets.first&.workflow&.stages&.first, nil]), as: :bubble, cached: true %> + <% if (unstaged_bubbles = @bubbles.where(stage: nil)).any? %> + <%= render partial: "bubbles/card_mini", collection: unstaged_bubbles, as: :bubble, cached: true %> + <% else %> +

Nothing here

+ <% end %>

Doing

- <% if @bubbles.any? %> - <%= render partial: "bubbles/card", collection: @bubbles.where.not(stage: @filter.buckets.first&.workflow&.stages&.first), as: :bubble, cached: true %> + <% if (staged_bubbles = @bubbles.where.not(stage: nil)).any? %> + <%= render partial: "bubbles/card", collection: staged_bubbles, as: :bubble, cached: true %> <% else %> -

Nothing here.

+

Nothing here

<% end %>
@@ -69,7 +73,7 @@ <% if (popped_bubbles = Filter.from_params(@filter.as_params.merge(indexed_by: "popped")).tap { |f| f.creator = Current.user }.bubbles).any? %> <%= render partial: "bubbles/card", collection: popped_bubbles, as: :bubble, cached: true %> <% else %> -

Nothing here.

+

Nothing here

<% end %>