diff --git a/app/controllers/cards_controller.rb b/app/controllers/cards_controller.rb index ef88bb2ca..174202742 100644 --- a/app/controllers/cards_controller.rb +++ b/app/controllers/cards_controller.rb @@ -11,8 +11,8 @@ class CardsController < ApplicationController PAGE_SIZE = 25 def index + set_page_and_extract_portion_from @filter.cards fresh_when etag: @columns - head :ok end def create diff --git a/app/views/cards/index.html.erb b/app/views/cards/index.html.erb index c50bcb624..f7694eadc 100644 --- a/app/views/cards/index.html.erb +++ b/app/views/cards/index.html.erb @@ -12,12 +12,6 @@ <% content_for :header do %> <%= render "filters/menu", user_filtering: @user_filtering %> -
- <% if collection = @filter.single_collection %> - <%= render "cards/webhooks", collection: collection if Current.user.admin? %> - <% end %> -
-

<%= @user_filtering.selected_collections_label %>

@@ -31,16 +25,8 @@ <%= render "filters/settings", user_filtering: @user_filtering %> -<%= tag.div data: { - controller: "drag-and-drop", - drag_and_drop_dragged_item_class: "drag-and-drop__dragged-item", - drag_and_drop_hover_container_class: "drag-and-drop__hover-container", - drag_and_drop_url_value: cards_drops_path(**@filter.as_params), - action: " - dragstart->drag-and-drop#dragStart - dragover->drag-and-drop#dragOver - drop->drag-and-drop#drop - dragend->drag-and-drop#dragEnd" } do %> - - <%= render "cards/index/columns", columns: @columns %> -<% end %> +
+ <%= turbo_frame_tag :card_columns do %> + <%= render partial: "cards/display/preview", collection: @page.records, as: :card, locals: { draggable: true }, cached: ->(card) { cacheable_preview_parts_for(card) } %> + <% end %> +