From 0a5060c07e9610f99bf371b2fe099b654b5c80af Mon Sep 17 00:00:00 2001 From: Nick Jackson Date: Tue, 27 Apr 2021 11:09:15 +0100 Subject: [PATCH 1/3] Update return to task list button on task views This makes the return action behave as expected, plus clarifies the language used. --- app/views/tasks/show.html.erb | 3 +-- config/locales/en.yml | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/tasks/show.html.erb b/app/views/tasks/show.html.erb index 81ae2753d..b08d34eb3 100644 --- a/app/views/tasks/show.html.erb +++ b/app/views/tasks/show.html.erb @@ -28,5 +28,4 @@ <% end %> -<%= link_to I18n.t("journey.specification.button"), journey_specification_path(@journey), class: "govuk-button" %> - +<%= link_to I18n.t("task.buttons.back"), journey_path(@journey), class: "govuk-button" %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 8ea1dcf2a..5efbed2e4 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -86,6 +86,9 @@ en: status: not_started: Not started completed: Completed + task: + buttons: + back: Back to all questions journey_map: page_title: "Contentful entry map" edit_step_link_text: "Edit step in Contentful" From aa3feeaa3e5943fe05b38fd8d10c1e614be863b5 Mon Sep 17 00:00:00 2001 From: Nick Jackson Date: Tue, 27 Apr 2021 11:13:27 +0100 Subject: [PATCH 2/3] Remove duplicate task list title --- app/views/tasks/show.html.erb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/views/tasks/show.html.erb b/app/views/tasks/show.html.erb index b08d34eb3..cb3d6bd94 100644 --- a/app/views/tasks/show.html.erb +++ b/app/views/tasks/show.html.erb @@ -4,7 +4,6 @@

<%= @task.title %>

    -

    <%= @task.title %>

    • <% @steps.each do |step| %> From 3ca14d419bfbe9702d323177c970555d9da6666e Mon Sep 17 00:00:00 2001 From: Nick Jackson Date: Tue, 27 Apr 2021 11:13:47 +0100 Subject: [PATCH 3/3] Fix incorrect loop nesting in task view The incorrect looping was causing elements to terminate early, breaking formatting. This now correctly closes elements where expected. --- app/views/tasks/show.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/tasks/show.html.erb b/app/views/tasks/show.html.erb index cb3d6bd94..d67050a78 100644 --- a/app/views/tasks/show.html.erb +++ b/app/views/tasks/show.html.erb @@ -22,9 +22,9 @@ <% end %> <% end %> -
    -
  1. - <% end %> + <% end %> + +
<%= link_to I18n.t("task.buttons.back"), journey_path(@journey), class: "govuk-button" %>