This commit is contained in:
David Heinemeier Hansson
2025-04-18 16:42:35 +02:00
parent 9cea403acd
commit c6f363c281
2 changed files with 4 additions and 9 deletions
+3 -6
View File
@@ -1,13 +1,10 @@
module WorkflowsHelper
def button_to_set_stage(card, stage)
button_to card_stagings_path(card, stage_id: stage),
button_to \
tag.span(stage.name, class: "overflow-ellipsis"), card_stagings_path(card, stage_id: stage),
method: :post, class: [ "btn justify-start workflow-stage txt-uppercase workflow-stage", { "workflow-stage--current": stage == card.stage } ],
form_class: "flex align-center gap-half",
data: { turbo_frame: "_top" } do
tag.span class: "overflow-ellipsis" do
stage.name
end
end
data: { turbo_frame: "_top" }
end
def stage_color(stage)
+1 -3
View File
@@ -1,6 +1,4 @@
<% workflow = card.collection.workflow %>
<% if workflow %>
<% if workflow = card.collection.workflow %>
<div id="<%= dom_id(card, "stages") %>" class="card__stages">
<% workflow.stages.each do |stage| %>
<%= button_to_set_stage card, stage %>