<% @page_title = "Edit #{@collection.name}" %> <% content_for :header do %> <% end %>
<%= form_with model: @collection, class: "flex flex-column gap txt-large", data: { controller: "form" } do |form| %>
<%= access_menu_tag @collection do %>
  • <%= icon_tag "everyone" %> Everyone
    Everyone
  • <% if User.active.count > 20 %> <% end %>
    <%= access_toggles_for @selected_users, selected: true %> <% if @selected_users.any? && @unselected_users.any? %>
    <% end %> <%= access_toggles_for @unselected_users, selected: false %>
    <% end %>
    <%= link_to "Cancel and go back", cards_path(collection_ids: [ @collection ]), data: { form_target: "cancel", turbo_frame: "_top" }, hidden: true %> <% end %>
    Choose a workflow

    Use a workflow to track progress in this collection.

    <%= form_with model: @collection, url: collection_workflow_path(@collection), local: true, method: :patch, data: { controller: "form" } do |form| %> <%= form.select :workflow_id, Current.account.workflows.map { |w| [w.name, w.id] }, { include_blank: "Choose…" }, class: "input input--select full-width", data: { action: "change->form#submit" } %> <% end %>

    <%= link_to "Manage workflows", workflows_path, class: "btn btn--plain txt-link" %>