Expand Closed and Not Now columns
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 %>
|
||||
|
||||
<div class="header__actions header__actions--start">
|
||||
<%= link_to @collection, class: "btn borderless txt-medium", data: { controller: "hotkey", action: "keydown.esc@document->hotkey#click" } do %>
|
||||
<span class="overflow-ellipsis">
|
||||
←
|
||||
<strong><%= @collection.name %></strong>
|
||||
</span>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<div class="card blank-slate blank-slate--card">
|
||||
<p class="txt-align-center txt-normal">Drag cards here</p>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<h1 class="header__title divider divider--fade full-width">
|
||||
<span class="overflow-ellipsis"><%= @page_title %></span>
|
||||
</h1>
|
||||
<% end %>
|
||||
|
||||
<section class="cards cards--grid">
|
||||
<%= 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 %>
|
||||
<p class="txt-align-center txt-normal">Closed cards will appear here.</p>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</section>
|
||||
|
||||
@@ -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 %>
|
||||
|
||||
<div class="header__actions header__actions--start">
|
||||
<%= link_to @collection, class: "btn borderless txt-medium", data: { controller: "hotkey", action: "keydown.esc@document->hotkey#click" } do %>
|
||||
<span class="overflow-ellipsis">
|
||||
←
|
||||
<strong><%= @collection.name %></strong>
|
||||
</span>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<div class="card blank-slate blank-slate--card">
|
||||
<p class="txt-align-center txt-normal">Drag cards here</p>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<h1 class="header__title divider divider--fade full-width">
|
||||
<span class="overflow-ellipsis"><%= @page_title %></span>
|
||||
</h1>
|
||||
<% end %>
|
||||
|
||||
<section class="cards cards--grid">
|
||||
<%= 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 %>
|
||||
<div class="card blank-slate blank-slate--card">
|
||||
<p class="txt-align-center txt-normal">Drag cards here</p>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</section>
|
||||
|
||||
@@ -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) %>
|
||||
</section>
|
||||
|
||||
@@ -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) %>
|
||||
</section>
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
<div class="cards__expander-menu" data-controller="dialog" data-action="keydown.esc->dialog#close click@document->dialog#closeOnClickOutside">
|
||||
<button class="btn btn--circle txt-x-small borderless" data-action="click->dialog#open">
|
||||
<%= icon_tag "menu-dots-horizontal", class: "translucent" %>
|
||||
<span class="for-screen-reader">Column options</span>
|
||||
</button>
|
||||
<dialog class="popup panel flex-column gap fill-white shadow txt-small margin-block-double" data-dialog-target="dialog">
|
||||
<ul class="popup__list">
|
||||
<li class="popup__item">
|
||||
<%= link_to column_path, class: "popup__btn btn", data: { turbo_frame: "_top" } do %>
|
||||
<%= icon_tag "external-link" %>
|
||||
<span>Expand column</span>
|
||||
<% end %>
|
||||
</li>
|
||||
</ul>
|
||||
</dialog>
|
||||
</div>
|
||||
Reference in New Issue
Block a user