Move all engagements to the stage picker UI
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
"notch-bottom notch-bottom notch-bottom";
|
||||
grid-template-columns: 48px minmax(0, 1120px) 48px;
|
||||
inline-size: fit-content;
|
||||
margin-block-start: 2rem;
|
||||
margin-block-start: var(--block-space);
|
||||
max-inline-size: 100%;
|
||||
margin-inline: auto;
|
||||
position: relative;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<% cache card do %>
|
||||
<section id="<%= dom_id(card, :card_container) %>"
|
||||
class="card-perma" style="--card-color: <%= card.color %>;">
|
||||
<%= render "cards/container/engagement", card: card %>
|
||||
<%= render "cards/container/status", card: card %>
|
||||
|
||||
<aside class="card-perma__actions card-perma__actions--left" role="toolbar">
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
<% if @card.published? && !@card.closed? %>
|
||||
<div class="card-perma__notch card-perma__notch--top" id="<%= dom_id(@card, :card_engagement_toggle) %>" style="--card-color: <%= @card.color %>;">
|
||||
<div class="btn__group flex full-width txt-uppercase">
|
||||
<%= form_with url: card_engagement_path(@card), method: :post, data: { controller: "form" } do |form| %>
|
||||
<%= form.hidden_field :engagement, value: "on_deck" %>
|
||||
<%= form.label :engagement, value: "on_deck", class: "btn", aria: { label: "Move to On Deck"} do %>
|
||||
<%= form.radio_button :engagement, "on_deck", checked: @card.on_deck?, class: "for-screen-reader", data: { action: "change->form#submit" } %>
|
||||
<span>On Deck</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<%= form_with url: card_engagement_path(@card), method: :delete, data: { controller: "form" } do |form| %>
|
||||
<%= form.label :engagement, value: "considering", class: "btn", aria: { label: "Move to Considering"} do %>
|
||||
<%= form.radio_button :engagement, "considering", checked: @card.considering?, class: "for-screen-reader", data: { action: "change->form#submit" } %>
|
||||
<span>~</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<%= form_with url: card_engagement_path(@card), method: :post, data: { controller: "form" } do |form| %>
|
||||
<%= form.hidden_field :engagement, value: "doing" %>
|
||||
<%= form.label :engagement, value: "doing", class: "btn", aria: { label: "Move to Doing"} do %>
|
||||
<%= form.radio_button :engagement, "doing", checked: @card.doing?, class: "for-screen-reader", data: { action: "change->form#submit" } %>
|
||||
<span style="min-inline-size: 8ch">Working On</span>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
@@ -1,7 +1,16 @@
|
||||
<% if workflow = card.collection.workflow %>
|
||||
<div id="<%= dom_id(card, :stages) %>" class="card__stages">
|
||||
<%= button_to "Not now", card_closure_path(card, reason: "Not now"),
|
||||
class: [ "btn justify-start workflow-stage txt-uppercase", { "workflow-stage--current": card.closed? } ],
|
||||
form_class: "flex align-center gap-half" %>
|
||||
<%= button_to "The Stream", card_engagement_path(card), method: :delete,
|
||||
class: [ "btn justify-start workflow-stage txt-uppercase", { "workflow-stage--current": card.considering? } ],
|
||||
form_class: "flex align-center gap-half" %>
|
||||
<% workflow.stages.each do |stage| %>
|
||||
<%= button_to_set_stage card, stage %>
|
||||
<% end %>
|
||||
<%= button_to "Closed", card_closure_path(card, reason: "Completed"),
|
||||
class: [ "btn justify-start workflow-stage txt-uppercase", { "workflow-stage--current": card.closed? } ],
|
||||
form_class: "flex align-center gap-half" %>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user