From fac288f71c80a26c2958a26be167e47a5162b5f7 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Tue, 1 Apr 2025 09:59:25 -0500 Subject: [PATCH] Bucket filter --- app/assets/stylesheets/cards.css | 6 ++++ app/views/bubbles/index.html.erb | 53 +++++++++++++++++++++++++------- 2 files changed, 48 insertions(+), 11 deletions(-) diff --git a/app/assets/stylesheets/cards.css b/app/assets/stylesheets/cards.css index 23f82f445..0e375f62e 100644 --- a/app/assets/stylesheets/cards.css +++ b/app/assets/stylesheets/cards.css @@ -167,6 +167,12 @@ padding: var(--block-space-half) var(--inline-space-double); } +.card-bucket__filter { + > button { + --hover-size: 0; + } +} + .card-column__filter { > button { --hover-size: 0; diff --git a/app/views/bubbles/index.html.erb b/app/views/bubbles/index.html.erb index 4e0e4477c..acd2eb959 100644 --- a/app/views/bubbles/index.html.erb +++ b/app/views/bubbles/index.html.erb @@ -13,16 +13,47 @@
-

- <% if @filter.buckets.none? %> - All collections - <% elsif @filter.buckets.one? %> - <%= @filter.buckets.first.name %> - <% else %> - <%= @filter.buckets.map(&:name).to_sentence %> - <% end %> -

- <%= render "bubbles/filters", filter: @filter %> +
+ + + + In Collection + <%= form_with url: bubbles_path, method: :get, class: "flex flex-column full-width popup__list", + data: { controller: "form" } do |form| %> + <% @filter.as_params.except(:bucket_ids).each do |key, value| %> + <%= filter_hidden_field_tag key, value %> + <% end %> + + <%= link_to bubbles_path(@filter.as_params.except(:bucket_ids)), class: "btn popup__item" do %> + All collections + <% end %> + + <% Current.user.buckets.order(:name).each do |bucket| %> + + <% end %> + <% end %> + +
+ <%#= render "bubbles/filters", filter: @filter %>
<% if (bucket = @filter.buckets.first) && @filter.buckets.one? %> @@ -77,7 +108,7 @@ <% end %> <%= link_to bubbles_path(@filter.as_params.except(:stage_ids)), class: "btn popup__item" do %> - Clear all + All stages <% end %> <% workflow.stages.each do |stage| %>