From d080773fa098e8761cb1099855f2ab92619015bd Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Thu, 2 Oct 2025 16:59:46 -0500 Subject: [PATCH] Expand Closed and Not Now columns --- .../collections/columns/closeds_controller.rb | 2 +- .../columns/not_nows_controller.rb | 2 +- .../collections/columns/closeds/show.html.erb | 37 +++++++++++++----- .../columns/not_nows/show.html.erb | 39 ++++++++++++++----- app/views/collections/show/_closed.html.erb | 4 +- app/views/collections/show/_not_now.html.erb | 4 +- .../collections/show/menu/_expand.html.erb | 16 ++++++++ 7 files changed, 82 insertions(+), 22 deletions(-) create mode 100644 app/views/collections/show/menu/_expand.html.erb diff --git a/app/controllers/collections/columns/closeds_controller.rb b/app/controllers/collections/columns/closeds_controller.rb index 2ffd7c253..30d2cd2c7 100644 --- a/app/controllers/collections/columns/closeds_controller.rb +++ b/app/controllers/collections/columns/closeds_controller.rb @@ -1,5 +1,5 @@ class Collections::Columns::ClosedsController < ApplicationController - include CollectionScoped + include CollectionScoped, FilterScoped def show set_page_and_extract_portion_from @collection.cards.closed.recently_closed_first diff --git a/app/controllers/collections/columns/not_nows_controller.rb b/app/controllers/collections/columns/not_nows_controller.rb index 8b6b233b6..b5a311a57 100644 --- a/app/controllers/collections/columns/not_nows_controller.rb +++ b/app/controllers/collections/columns/not_nows_controller.rb @@ -1,5 +1,5 @@ class Collections::Columns::NotNowsController < ApplicationController - include CollectionScoped + include CollectionScoped, FilterScoped def show set_page_and_extract_portion_from @collection.cards.postponed.reverse_chronologically.with_golden_first diff --git a/app/views/collections/columns/closeds/show.html.erb b/app/views/collections/columns/closeds/show.html.erb index 160361ea8..9e6c16b73 100644 --- a/app/views/collections/columns/closeds/show.html.erb +++ b/app/views/collections/columns/closeds/show.html.erb @@ -1,11 +1,30 @@ -<%= turbo_frame_tag :closed_column do %> - <% if @page.used? %> - <%= with_manual_pagination :closed_column, @page do %> - <%= render "collections/columns/list", cards: @page.records, draggable: true %> +<% @page_title = "Column: Closed" %> + +<% content_for :header do %> + <%= render "filters/menu", user_filtering: @user_filtering %> + +
+ <%= link_to @collection, class: "btn borderless txt-medium", data: { controller: "hotkey", action: "keydown.esc@document->hotkey#click" } do %> + + ← + <%= @collection.name %> + <% end %> - <% else %> -
-

Drag cards here

-
- <% end %> +
+ +

+ <%= @page_title %> +

<% end %> + +
+ <%= turbo_frame_tag :closed_column do %> + <% if @page.used? %> + <%= with_manual_pagination :closed_column, @page do %> + <%= render "collections/columns/list", cards: @page.records, draggable: true %> + <% end %> + <% else %> +

Closed cards will appear here.

+ <% end %> + <% end %> +
diff --git a/app/views/collections/columns/not_nows/show.html.erb b/app/views/collections/columns/not_nows/show.html.erb index d50ed3371..506d164cf 100644 --- a/app/views/collections/columns/not_nows/show.html.erb +++ b/app/views/collections/columns/not_nows/show.html.erb @@ -1,11 +1,32 @@ -<%= turbo_frame_tag :not_now_column do %> - <% if @page.used? %> - <%= with_manual_pagination :not_now_column, @page do %> - <%= render "collections/columns/list", cards: @page.records, draggable: true %> +<% @page_title = "Column: Now now" %> + +<% content_for :header do %> + <%= render "filters/menu", user_filtering: @user_filtering %> + +
+ <%= link_to @collection, class: "btn borderless txt-medium", data: { controller: "hotkey", action: "keydown.esc@document->hotkey#click" } do %> + + ← + <%= @collection.name %> + <% end %> - <% else %> -
-

Drag cards here

-
- <% end %> +
+ +

+ <%= @page_title %> +

<% end %> + +
+ <%= turbo_frame_tag :not_now_column do %> + <% if @page.used? %> + <%= with_manual_pagination :not_now_column, @page do %> + <%= render "collections/columns/list", cards: @page.records, draggable: true %> + <% end %> + <% else %> +
+

Drag cards here

+
+ <% end %> + <% end %> +
diff --git a/app/views/collections/show/_closed.html.erb b/app/views/collections/show/_closed.html.erb index 8d7f41a43..383bba6db 100644 --- a/app/views/collections/show/_closed.html.erb +++ b/app/views/collections/show/_closed.html.erb @@ -6,7 +6,9 @@ data-drag-and-drop-url="<%= columns_card_drops_closure_path("__id__") %>" > - <%= render "collections/show/expander", title: "Done", count: collection.cards.closed.count, column_id: "closed-cards" %> + <%= render "collections/show/expander", title: "Done", count: collection.cards.closed.count, column_id: "closed-cards" do %> + <%= render "collections/show/menu/expand", column_path: collection_columns_closed_path(collection) %> + <% end %> <%= column_frame_tag :closed_column, src: collection_columns_closed_path(collection) %> diff --git a/app/views/collections/show/_not_now.html.erb b/app/views/collections/show/_not_now.html.erb index b24999067..c99b9b3af 100644 --- a/app/views/collections/show/_not_now.html.erb +++ b/app/views/collections/show/_not_now.html.erb @@ -6,7 +6,9 @@ data-drag-and-drop-url="<%= columns_card_drops_not_now_path("__id__") %>" > - <%= render "collections/show/expander", title: "Not Now", count: collection.cards.postponed.count, column_id: "not-now" %> + <%= render "collections/show/expander", title: "Not Now", count: collection.cards.postponed.count, column_id: "not-now" do %> + <%= render "collections/show/menu/expand", column_path: collection_columns_not_now_path(collection) %> + <% end %> <%= column_frame_tag :not_now_column, src: collection_columns_not_now_path(collection) %> diff --git a/app/views/collections/show/menu/_expand.html.erb b/app/views/collections/show/menu/_expand.html.erb new file mode 100644 index 000000000..bf217954e --- /dev/null +++ b/app/views/collections/show/menu/_expand.html.erb @@ -0,0 +1,16 @@ +
+ + + + +
\ No newline at end of file