%= turbo_frame_tag @collection, :workflows do %>
Workflows
Use a Workflow to track progress in this Collection.
<% Workflow.all.each do |workflow| %>
<%= button_to collection_workflow_path(collection), method: :patch, aria: { label: workflow == collection.workflow ? "Stop using this workflow" : "Use this workflow" } do %>
<%= hidden_field_tag "collection[workflow_id]", workflow == collection.workflow ? "" : workflow.id %>
<%= workflow.name %>
<% workflow.stages.each do |stage| %>
-
<%= stage.name %>
<% end %>
<% end %>
<% end %>
<%= link_to "Manage workflows", workflows_path, class: "btn btn--plain txt-link", data: { turbo_frame: "_top" } %>
<% end %>