+
+
<%= turbo_frame_tag dom_id(workflow, :header) do %>
- <%= link_to edit_workflow_path(workflow), class: "btn btn--small" do %>
- <%= image_tag "pencil.svg", aria: { hidden: true }, size: 24 %>
- Edit <%= workflow.name %>
- <% end %>
-
-
-
+
- <%= workflow.name %>
- - <%= button_to workflow_path(workflow), method: :delete, class: "btn btn--negative btn--small", data: { turbo_frame: :workflows, turbo_confirm: "Are you sure you want to delete this workflow?" } do %> - <%= image_tag "minus.svg", aria: { hidden: true }, size: 24 %> - Delete <%= workflow.name %> + <%= link_to edit_workflow_path(workflow) do %> +<%= workflow.name %>
<% end %> <% end %>
+
<%= turbo_frame_tag dom_id(workflow, :stages) do %>
<%= render partial: "workflows/stages/stage", collection: workflow.stages %>
- <%= link_to new_workflow_stage_path(workflow), class: "btn btn--positive btn--small" do %>
+
+ <%= link_to new_workflow_stage_path(workflow), class: "btn btn--small" do %>
<%= image_tag "add.svg", aria: { hidden: true }, size: 24 %>
New stage
<% end %>
diff --git a/app/views/workflows/edit.html.erb b/app/views/workflows/edit.html.erb
index ce2f4e027..6414e9347 100644
--- a/app/views/workflows/edit.html.erb
+++ b/app/views/workflows/edit.html.erb
@@ -1,17 +1,24 @@
<%= turbo_frame_tag dom_id(@workflow, :header) do %>
- <%= form_with model: @workflow, url: workflow_path(@workflow) do |form| %>
-
+
<%= render partial: "workflows/workflow", collection: @workflows %>
-
- <%= link_to "New workflow", new_workflow_path, class: "btn" %>
<% end %>
diff --git a/app/views/workflows/new.html.erb b/app/views/workflows/new.html.erb
index fa4a66828..aac4ac355 100644
--- a/app/views/workflows/new.html.erb
+++ b/app/views/workflows/new.html.erb
@@ -1,6 +1,24 @@
-<%= turbo_frame_tag :workflows do %>
- <%= form_with model: @workflow, url: workflows_path do |form| %>
- <%= form.text_field :name, required: true, autofocus: true %>
- <%= form.submit %>
- <% end %>
+<% @page_title = "Create a new Workflow" %>
+
+<% content_for :header do %>
+
+<% end %>
+
+<%= turbo_frame_tag :workflows do %>
+
+ <%= form_with model: @workflow, url: workflows_path do |form| %>
+ <%= form.text_field :name, required: true, autofocus: true, class: "input txt-large", placeholder: "Name your Workflow…" %>
+ <%= form.button type: :submit, class: "btn btn--reversed center margin-block-start txt-large" do %>
+ <%= image_tag "check.svg", aria: { hidden: true }, size: 24 %>
+ Create Workflow
+ <% end %>
+ <% end %>
+
<% end %>
diff --git a/app/views/workflows/stages/_stage.html.erb b/app/views/workflows/stages/_stage.html.erb
index 34680f8d9..21cf0cf0b 100644
--- a/app/views/workflows/stages/_stage.html.erb
+++ b/app/views/workflows/stages/_stage.html.erb
@@ -1,19 +1,7 @@
-
- <%= form.text_field :name, required: true, autofocus: true %>
+
<% end %>
diff --git a/app/views/workflows/index.html.erb b/app/views/workflows/index.html.erb
index 17ab2b158..bd8cc5c2a 100644
--- a/app/views/workflows/index.html.erb
+++ b/app/views/workflows/index.html.erb
@@ -1,7 +1,29 @@
+<% @page_title = "Workflows" %>
+
+<% content_for :header do %>
+
+<% end %>
+
<%= turbo_frame_tag :workflows do %>
-
+ <%= form_with model: @workflow, url: workflow_path(@workflow), id: dom_id(@workflow, :form), class: "full-width" do |form| %>
+
- <% end %>
+ <%= link_to workflow_path(@workflow), class: "btn btn--small", data: { turbo_frame: dom_id(@workflow) } do %>
+ <%= image_tag "remove-med.svg", aria: { hidden: true }, size: 24 %>
+ Cancel
+ <% end %>
+
+ <%= button_to workflow_path(@workflow), method: :delete, class: "btn btn--small btn--negative", data: { turbo_frame: :workflows, turbo_confirm: "Are you sure you want to delete this workflow?" } do %>
+ <%= image_tag "minus.svg", aria: { hidden: true }, size: 24 %>
+ Delete <%= @workflow.name %>
+ <% end %>
+ + <%= form.text_field :name, required: true, autofocus: true, class: "input full-width", style: "--input-padding: 0.2em 0.5em;" %> +
+ <% end %> -
- <%= form.button type: :submit, class: "btn btn--small" do %>
- <%= image_tag "check.svg", aria: { hidden: true }, size: 24 %>
- <% end %>
+ <%= tag.button type: :submit, class: "btn btn--small btn--positive", form: dom_id(@workflow, :form) do %>
+ <%= image_tag "check.svg", aria: { hidden: true }, size: 24 %>
+ Save
+ <% end %>
- <%= link_to workflow_path(@workflow), class: "btn btn--small", data: { turbo_frame: dom_id(@workflow) } do %>
- <%= image_tag "remove.svg", aria: { hidden: true }, size: 24 %>
- <% end %>
-
-
+
<%= turbo_frame_tag stage do %>
-
diff --git a/app/views/workflows/stages/edit.html.erb b/app/views/workflows/stages/edit.html.erb
index f2eb8cb0e..bb3be76e8 100644
--- a/app/views/workflows/stages/edit.html.erb
+++ b/app/views/workflows/stages/edit.html.erb
@@ -1,17 +1,25 @@
<%= turbo_frame_tag @stage do %>
- <%= form_with model: @stage, url: workflow_stage_path(@stage.workflow, @stage) do |form| %>
- <%= stage.name %>
- - - - <%= link_to edit_workflow_stage_path(stage.workflow, stage), class: "btn btn--small" do %> - <%= image_tag "pencil.svg", aria: { hidden: true }, size: 24 %> - Edit <%= stage.name %> - <% end %> - - <% if stage_counter >= 1 %> - <%= button_to workflow_stage_path(stage.workflow, stage), method: :delete, class: "btn btn--negative btn--small", data: { turbo_frame: dom_id(stage.workflow), turbo_confirm: "Are you sure you want to delete this stage?" } do %> - <%= image_tag "minus.svg", aria: { hidden: true }, size: 24 %> - Delete <%= stage.name %> - <% end %> + <%= link_to edit_workflow_stage_path(stage.workflow, stage) do %> + <%= stage.name %> <% end %> <% end %>
- <%= form.text_field :name, required: true, autofocus: true %>
-
-
+ <%= form_with model: @stage, url: workflow_stage_path(@stage.workflow, @stage), id: dom_id(@stage, :form), class: "full-width" do |form| %>
+ <%= form.text_field :name, required: true, autofocus: true, class: "input full-width" %>
<% end %>
+
+
- <%= form.button type: :submit, class: "btn btn--small" do %>
- <%= image_tag "check.svg", aria: { hidden: true }, size: 24 %>
- <% end %>
-
- <%= link_to workflow_path(@workflow), class: "btn btn--small", data: { turbo_frame: dom_id(@workflow) } do %>
- <%= image_tag "remove.svg", aria: { hidden: true }, size: 24 %>
- <% end %>
-
-
+ <%= tag.button type: :submit, class: "btn btn--small btn--positive", form: dom_id(@stage, :form) do %>
+ <%= image_tag "check.svg", aria: { hidden: true }, size: 24 %>
+ Save
+ <% end %>
+
+ <%= link_to workflow_path(@workflow), class: "btn btn--small", data: { turbo_frame: dom_id(@workflow) } do %>
+ <%= image_tag "remove-med.svg", aria: { hidden: true }, size: 24 %>
+ Cancel
+ <% end %>
+
+ <% if @stage.workflow.stages.many? %>
+ <%= button_to workflow_stage_path(@stage.workflow, @stage), method: :delete, class: "btn btn--negative btn--small",
+ data: { turbo_frame: dom_id(@workflow), turbo_confirm: "Are you sure you want to delete this stage?" } do %>
+ <%= image_tag "minus.svg", aria: { hidden: true }, size: 24 %>
+ Delete <%= @stage.name %>
+ <% end %>
+ <% end %>
+
<% end %>
diff --git a/app/views/workflows/stages/new.html.erb b/app/views/workflows/stages/new.html.erb
index 86479ee19..ce9ef5fb8 100644
--- a/app/views/workflows/stages/new.html.erb
+++ b/app/views/workflows/stages/new.html.erb
@@ -1,6 +1,13 @@
<%= turbo_frame_tag dom_id(@stage.workflow, :stages) do %>
- <%= form_with model: @stage, url: workflow_stages_path(@stage.workflow) do |form| %>
- <%= form.text_field :name, required: true, autofocus: true %>
- <%= form.submit %>
+ <%= form_with model: @stage, url: workflow_stages_path(@stage.workflow), class: "flex align-center gap-half" do |form| %>
+ <%= form.text_field :name, required: true, autofocus: true, class: "input" %>
+ <%= form.button type: :submit, class: "btn btn--positive txt-small" do %>
+ <%= image_tag "check.svg", aria: { hidden: true }, size: 24 %>
+ Add stage
+ <% end %>
+ <%= link_to workflow_path(@workflow), class: "btn btn--small" do %>
+ <%= image_tag "remove-med.svg", aria: { hidden: true }, size: 24 %>
+ Cancel
+ <% end %>
<% end %>
<% end %>