Initial cards view
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -12,12 +12,6 @@
|
||||
<% content_for :header do %>
|
||||
<%= render "filters/menu", user_filtering: @user_filtering %>
|
||||
|
||||
<div class="header__actions header__actions--start">
|
||||
<% if collection = @filter.single_collection %>
|
||||
<%= render "cards/webhooks", collection: collection if Current.user.admin? %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<h1 class="header__title divider divider--fade full-width">
|
||||
<span class="overflow-ellipsis"><%= @user_filtering.selected_collections_label %></span>
|
||||
</h1>
|
||||
@@ -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 %>
|
||||
<section class="cards">
|
||||
<%= 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 %>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user