diff --git a/app/helpers/workflows_helper.rb b/app/helpers/workflows_helper.rb index cf97fbe18..f60e9d7f8 100644 --- a/app/helpers/workflows_helper.rb +++ b/app/helpers/workflows_helper.rb @@ -22,4 +22,14 @@ module WorkflowsHelper "It's not being used in any collections." end end + + def workflow_switch_confirmation_message(workflow, collection) + if workflow == collection.workflow + "Stop using #{workflow.name}? Cards you're working on will lose their current stage." + elsif collection.workflow.present? + "Switch to #{workflow.name}? This will return all cards you're working on to the first stage." + else + nil + end + end end diff --git a/app/views/collections/edit/_workflows.html.erb b/app/views/collections/edit/_workflows.html.erb index 180b6a4c6..3460c4f35 100644 --- a/app/views/collections/edit/_workflows.html.erb +++ b/app/views/collections/edit/_workflows.html.erb @@ -7,7 +7,10 @@