diff --git a/app/controllers/concerns/public_collection_scoped.rb b/app/controllers/concerns/public_collection_scoped.rb
index 3f5edb35d..11ecacfca 100644
--- a/app/controllers/concerns/public_collection_scoped.rb
+++ b/app/controllers/concerns/public_collection_scoped.rb
@@ -7,6 +7,6 @@ module PublicCollectionScoped
private
def set_collection
- @collection = Collection.find_by_published_key(params[:id] || params[:collection_id])
+ @collection = Collection.find_by_published_key(params[:collection_id] || params[:id])
end
end
diff --git a/app/controllers/public/collections/columns/closeds_controller.rb b/app/controllers/public/collections/columns/closeds_controller.rb
new file mode 100644
index 000000000..db7577958
--- /dev/null
+++ b/app/controllers/public/collections/columns/closeds_controller.rb
@@ -0,0 +1,14 @@
+class Public::Collections::Columns::ClosedsController < ApplicationController
+ include PublicCollectionScoped
+
+ allow_unauthenticated_access only: :show
+
+ layout "public"
+
+ def show
+ set_page_and_extract_portion_from @collection.cards.closed.recently_closed_first
+
+ # To enable caching at intermediate proxies during traffic spikes
+ expires_in 5.seconds, public: true
+ end
+end
\ No newline at end of file
diff --git a/app/controllers/public/collections/columns/not_nows_controller.rb b/app/controllers/public/collections/columns/not_nows_controller.rb
new file mode 100644
index 000000000..8d1dba303
--- /dev/null
+++ b/app/controllers/public/collections/columns/not_nows_controller.rb
@@ -0,0 +1,14 @@
+class Public::Collections::Columns::NotNowsController < ApplicationController
+ include PublicCollectionScoped
+
+ allow_unauthenticated_access only: :show
+
+ layout "public"
+
+ def show
+ set_page_and_extract_portion_from @collection.cards.postponed.reverse_chronologically
+
+ # To enable caching at intermediate proxies during traffic spikes
+ expires_in 5.seconds, public: true
+ end
+end
\ No newline at end of file
diff --git a/app/controllers/public/collections/columns/streams_controller.rb b/app/controllers/public/collections/columns/streams_controller.rb
new file mode 100644
index 000000000..b371a5600
--- /dev/null
+++ b/app/controllers/public/collections/columns/streams_controller.rb
@@ -0,0 +1,14 @@
+class Public::Collections::Columns::StreamsController < ApplicationController
+ include PublicCollectionScoped
+
+ allow_unauthenticated_access only: :show
+
+ layout "public"
+
+ def show
+ set_page_and_extract_portion_from @collection.cards.awaiting_triage.reverse_chronologically
+
+ # To enable caching at intermediate proxies during traffic spikes
+ expires_in 5.seconds, public: true
+ end
+end
\ No newline at end of file
diff --git a/app/controllers/public/collections/columns_controller.rb b/app/controllers/public/collections/columns_controller.rb
new file mode 100644
index 000000000..3817c81b7
--- /dev/null
+++ b/app/controllers/public/collections/columns_controller.rb
@@ -0,0 +1,21 @@
+class Public::Collections::ColumnsController < ApplicationController
+ include ActionView::RecordIdentifier, PublicCollectionScoped
+
+ allow_unauthenticated_access only: :show
+
+ layout "public"
+
+ before_action :set_column, only: :show
+
+ def show
+ set_page_and_extract_portion_from @column.cards.active.reverse_chronologically
+
+ # To enable caching at intermediate proxies during traffic spikes
+ expires_in 5.seconds, public: true
+ end
+
+ private
+ def set_column
+ @column = @collection.columns.find(params[:id])
+ end
+end
\ No newline at end of file
diff --git a/app/controllers/public/collections_controller.rb b/app/controllers/public/collections_controller.rb
index f8dd3e32c..1529df607 100644
--- a/app/controllers/public/collections_controller.rb
+++ b/app/controllers/public/collections_controller.rb
@@ -6,10 +6,7 @@ class Public::CollectionsController < ApplicationController
layout "public"
def show
- # @considering = current_page_from @collection.cards.considering.latest, per_page: CardsController::PAGE_SIZE
- # @on_deck = current_page_from @collection.cards.on_deck.latest, per_page: CardsController::PAGE_SIZE
- # @doing = current_page_from @collection.cards.doing.latest, per_page: CardsController::PAGE_SIZE
- # @closed = current_page_from @collection.cards.closed.recently_closed_first, per_page: CardsController::PAGE_SIZE
+ set_page_and_extract_portion_from @collection.cards.awaiting_triage.reverse_chronologically
# To enable caching at intermediate proxies during traffic spikes
expires_in 5.seconds, public: true
diff --git a/app/views/cards/display/_preview.html.erb b/app/views/cards/display/_preview.html.erb
index 94461f0ae..3f3b4b139 100644
--- a/app/views/cards/display/_preview.html.erb
+++ b/app/views/cards/display/_preview.html.erb
@@ -22,7 +22,7 @@
- <%= render "cards/display/preview/stages", card: card %>
+ <%= render "cards/display/preview/columns", card: card %>
diff --git a/app/views/cards/display/_public_preview.html.erb b/app/views/cards/display/_public_preview.html.erb
index b9180d94d..644cb49d4 100644
--- a/app/views/cards/display/_public_preview.html.erb
+++ b/app/views/cards/display/_public_preview.html.erb
@@ -19,7 +19,7 @@
- <%= render "cards/display/public_preview/stages", card: card if card.doing? %>
+ <%= render "cards/display/public_preview/columns", card: card if card.triaged? %>
@@ -29,7 +29,7 @@
<%= render "cards/display/common/background", card: card %>
- <%= link_to published_card_path(card), class: "card__link", title: card_title_tag(card) do %>
+ <%= link_to published_card_path(card), class: "card__link", title: card_title_tag(card), data: { turbo_frame: "_top" } do %>
<%= card.title %>
<% end %>
diff --git a/app/views/cards/display/preview/_columns.html.erb b/app/views/cards/display/preview/_columns.html.erb
new file mode 100644
index 000000000..b99a37930
--- /dev/null
+++ b/app/views/cards/display/preview/_columns.html.erb
@@ -0,0 +1,5 @@
+
+ <% card.collection.columns.each do |column| %>
+ <%= tag.span column.name, class: ["workflow-stage btn overflow-ellipsis", { "workflow-stage--current": column == card.column }] %>
+ <% end %>
+
diff --git a/app/views/cards/display/preview/_stages.html.erb b/app/views/cards/display/preview/_stages.html.erb
deleted file mode 100644
index 34c70bf7e..000000000
--- a/app/views/cards/display/preview/_stages.html.erb
+++ /dev/null
@@ -1,7 +0,0 @@
-<% if workflow = card.workflow %>
-
- <% workflow.stages.each do |stage| %>
- <%= tag.span stage.name, class: ["workflow-stage btn overflow-ellipsis", { "workflow-stage--current": stage == card.stage }] %>
- <% end %>
-
-<% end %>
diff --git a/app/views/cards/display/public_preview/_columns.html.erb b/app/views/cards/display/public_preview/_columns.html.erb
new file mode 100644
index 000000000..670767f24
--- /dev/null
+++ b/app/views/cards/display/public_preview/_columns.html.erb
@@ -0,0 +1,6 @@
+
+ <% card.collection.columns.each do |column| %>
+ <%= tag.div column.name,
+ class: ["workflow-stage overflow-ellipsis flex align-center gap-half btn non-clickable no-hover", { "workflow-stage--current": column == card.column }] %>
+ <% end %>
+
diff --git a/app/views/cards/display/public_preview/_stages.html.erb b/app/views/cards/display/public_preview/_stages.html.erb
deleted file mode 100644
index 824aa3136..000000000
--- a/app/views/cards/display/public_preview/_stages.html.erb
+++ /dev/null
@@ -1,8 +0,0 @@
-<% if workflow = card.workflow %>
-
- <% workflow.stages.each do |stage| %>
- <%= tag.div stage.name,
- class: ["workflow-stage overflow-ellipsis flex align-center gap-half btn non-clickable no-hover", { "workflow-stage--current": stage == card.stage }] %>
- <% end %>
-
-<% end %>
diff --git a/app/views/events/event/_layout.html.erb b/app/views/events/event/_layout.html.erb
index a597760a5..48b25d0bd 100644
--- a/app/views/events/event/_layout.html.erb
+++ b/app/views/events/event/_layout.html.erb
@@ -1,5 +1,5 @@
<%= link_to event.notifiable_target,
- class: "event event--#{ event.action } #{ "golden-effect" if event.card.golden? && card.doing? } center-block flex flex-column full-width align-start justify-start position-relative",
+ class: "event event--#{ event.action } #{ "golden-effect" if event.card.golden? } center-block flex flex-column full-width align-start justify-start position-relative",
style: "--card-color: #{ card.closed? ? "var(--color-card-complete)" : card.color };",
data: { related_element_target: "related",
related_element_group_value: card.id,
diff --git a/app/views/public/cards/show.html.erb b/app/views/public/cards/show.html.erb
index c02cd1df1..a146964c4 100644
--- a/app/views/public/cards/show.html.erb
+++ b/app/views/public/cards/show.html.erb
@@ -32,7 +32,7 @@
<%= render "public/cards/show/title", card: @card %>
- <%= render "cards/display/public_preview/stages", card: @card %>
+ <%= render "cards/display/public_preview/columns", card: @card if @card.open? %>
<%= render "public/cards/show/steps", card: @card %>
diff --git a/app/views/public/collections/columns/_list.html.erb b/app/views/public/collections/columns/_list.html.erb
new file mode 100644
index 000000000..e606416b0
--- /dev/null
+++ b/app/views/public/collections/columns/_list.html.erb
@@ -0,0 +1 @@
+<%= render partial: "cards/display/public_preview", collection: cards, as: :card, cached: ->(card) { card.cache_invalidation_parts.for_preview } %>
\ No newline at end of file
diff --git a/app/views/public/collections/columns/closeds/show.html.erb b/app/views/public/collections/columns/closeds/show.html.erb
new file mode 100644
index 000000000..ced3cc16a
--- /dev/null
+++ b/app/views/public/collections/columns/closeds/show.html.erb
@@ -0,0 +1,11 @@
+<%= turbo_frame_tag :closed_column do %>
+ <% if @page.used? %>
+ <%= with_manual_pagination :closed_column, @page do %>
+ <%= render "public/collections/columns/list", cards: @page.records %>
+ <% end %>
+ <% else %>
+
+ <% end %>
+<% end %>
\ No newline at end of file
diff --git a/app/views/public/collections/columns/not_nows/show.html.erb b/app/views/public/collections/columns/not_nows/show.html.erb
new file mode 100644
index 000000000..1a2356aec
--- /dev/null
+++ b/app/views/public/collections/columns/not_nows/show.html.erb
@@ -0,0 +1,11 @@
+<%= turbo_frame_tag :not_now_column do %>
+ <% if @page.used? %>
+ <%= with_manual_pagination :not_now_column, @page do %>
+ <%= render "public/collections/columns/list", cards: @page.records %>
+ <% end %>
+ <% else %>
+
+ <% end %>
+<% end %>
\ No newline at end of file
diff --git a/app/views/public/collections/columns/show.html.erb b/app/views/public/collections/columns/show.html.erb
new file mode 100644
index 000000000..f0068a1b1
--- /dev/null
+++ b/app/views/public/collections/columns/show.html.erb
@@ -0,0 +1,11 @@
+<%= turbo_frame_tag dom_id(@column, :cards) do %>
+ <% if @page.used? %>
+ <%= with_manual_pagination dom_id(@column, :cards), @page do %>
+ <%= render "public/collections/columns/list", cards: @page.records %>
+ <% end %>
+ <% else %>
+
+ <% end %>
+<% end %>
\ No newline at end of file
diff --git a/app/views/public/collections/columns/streams/show.html.erb b/app/views/public/collections/columns/streams/show.html.erb
new file mode 100644
index 000000000..ff8d3f5fe
--- /dev/null
+++ b/app/views/public/collections/columns/streams/show.html.erb
@@ -0,0 +1,11 @@
+<%= turbo_frame_tag :stream_column do %>
+ <% if @page.used? %>
+ <%= with_manual_pagination :stream_column, @page do %>
+ <%= render "public/collections/columns/list", cards: @page.records %>
+ <% end %>
+ <% else %>
+
+ <% end %>
+<% end %>
\ No newline at end of file
diff --git a/app/views/public/collections/show.html.erb b/app/views/public/collections/show.html.erb
index 9b9ac0bdc..5c85d038d 100644
--- a/app/views/public/collections/show.html.erb
+++ b/app/views/public/collections/show.html.erb
@@ -24,10 +24,4 @@
<% end %>
-
- <%= render "public/collections/show/on_deck", collection: @collection, page: @on_deck %>
- <%= render "public/collections/show/considering", collection: @collection, page: @considering %>
- <%= render "public/collections/show/doing", collection: @collection, page: @doing %>
-
-
-<%= render "public/collections/show/closed", collection: @collection, page: @closed %>
+<%= render "public/collections/show/columns", page: @page, collection: @collection %>
diff --git a/app/views/public/collections/show/_closed.html.erb b/app/views/public/collections/show/_closed.html.erb
index db19088f8..75c5448ea 100644
--- a/app/views/public/collections/show/_closed.html.erb
+++ b/app/views/public/collections/show/_closed.html.erb
@@ -1,13 +1,9 @@
-
- <% if page.used? %>
- <%= render partial: "cards/display/public_preview", collection: page.records, as: :card, cached: true %>
+
- <% unless page.last? %>
-
- <%= public_collection_cards_next_page_link collection, "closed-cards", fetch_on_visible: true, page: page %>
-
- <% end %>
- <% else %>
- Nothing here
- <% end %>
+ <%= render "collections/show/expander", title: "Done", count: collection.cards.closed.count, column_id: "closed-cards" %>
+
+ <%= column_frame_tag :closed_column, src: public_collection_columns_closed_path(collection.publication.key) %>
diff --git a/app/views/public/collections/show/_column.html.erb b/app/views/public/collections/show/_column.html.erb
new file mode 100644
index 000000000..91cedb28f
--- /dev/null
+++ b/app/views/public/collections/show/_column.html.erb
@@ -0,0 +1,10 @@
+
+ <%= render "collections/show/expander", title: column.name, count: column.cards.active.count, column_id: dom_id(column) %>
+
+ <%= column_frame_tag dom_id(column, :cards), src: public_collection_column_path(column.collection.publication.key, column) %>
+
\ No newline at end of file
diff --git a/app/views/public/collections/show/_columns.html.erb b/app/views/public/collections/show/_columns.html.erb
new file mode 100644
index 000000000..1ac361b6b
--- /dev/null
+++ b/app/views/public/collections/show/_columns.html.erb
@@ -0,0 +1,15 @@
+<%= turbo_frame_tag :cards_container do %>
+
+
+
+ <%= render "public/collections/show/not_now", collection: collection %>
+
+
+ <%= render "public/collections/show/stream", collection: collection, page: page %>
+
+
+ <%= render partial: "public/collections/show/column", collection: collection.columns, cached: true %>
+ <%= render "public/collections/show/closed", collection: collection %>
+
+
+<% end %>
\ No newline at end of file
diff --git a/app/views/public/collections/show/_not_now.html.erb b/app/views/public/collections/show/_not_now.html.erb
new file mode 100644
index 000000000..0cf5eac22
--- /dev/null
+++ b/app/views/public/collections/show/_not_now.html.erb
@@ -0,0 +1,9 @@
+
+
+ <%= render "collections/show/expander", title: "Not Now", count: collection.cards.postponed.count, column_id: "not-now" %>
+
+ <%= column_frame_tag :not_now_column, src: public_collection_columns_not_now_path(collection.publication.key) %>
+
\ No newline at end of file
diff --git a/app/views/public/collections/show/_stream.html.erb b/app/views/public/collections/show/_stream.html.erb
new file mode 100644
index 000000000..6d7f58254
--- /dev/null
+++ b/app/views/public/collections/show/_stream.html.erb
@@ -0,0 +1,12 @@
+
+
+
+ <% if page.used? %>
+ <%= with_manual_pagination "the-stream", @page do %>
+ <%= render "public/collections/columns/list", cards: page.records %>
+ <% end %>
+ <% end %>
+
+
+
\ No newline at end of file
diff --git a/config/routes.rb b/config/routes.rb
index d26274106..6c69f6bc5 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -168,6 +168,14 @@ Rails.application.routes.draw do
resources :collections do
scope module: :collections do
resources :card_previews
+
+ namespace :columns do
+ resource :not_now, only: :show
+ resource :stream, only: :show
+ resource :closed, only: :show
+ end
+
+ resources :columns, only: :show
end
resources :cards, only: :show