From dc4d2f596bf12d5276a334116f6a0435c654b3a9 Mon Sep 17 00:00:00 2001 From: Paul Robert Lloyd Date: Thu, 2 Dec 2021 16:37:40 +0000 Subject: [PATCH] Tweak page titles --- app/views/about/index.html.erb | 6 ++++- app/views/case_logs/bulk_upload.html.erb | 22 ++++++++++--------- app/views/case_logs/edit.html.erb | 13 +++++++---- app/views/case_logs/index.html.erb | 7 +++--- app/views/devise/confirmations/reset.html.erb | 7 +++++- app/views/devise/passwords/new.html.erb | 6 ++++- app/views/devise/sessions/new.html.erb | 7 ++++-- app/views/form/check_answers.html.erb | 6 ++++- app/views/form/page.html.erb | 3 ++- app/views/organisations/show.html.erb | 1 + app/views/organisations/users.html.erb | 1 + app/views/users/edit.html.erb | 6 ++++- app/views/users/edit_password.html.erb | 6 ++++- app/views/users/new.html.erb | 6 ++++- app/views/users/show.html.erb | 5 ++++- 15 files changed, 74 insertions(+), 28 deletions(-) diff --git a/app/views/about/index.html.erb b/app/views/about/index.html.erb index 7d877fdd7..8de21683c 100644 --- a/app/views/about/index.html.erb +++ b/app/views/about/index.html.erb @@ -1 +1,5 @@ -

About

\ No newline at end of file +<% content_for :title, "About" %> + +

+ <%= content_for(:title) %> +

diff --git a/app/views/case_logs/bulk_upload.html.erb b/app/views/case_logs/bulk_upload.html.erb index 86416b4d1..2ae6b94a9 100644 --- a/app/views/case_logs/bulk_upload.html.erb +++ b/app/views/case_logs/bulk_upload.html.erb @@ -1,10 +1,12 @@ -
- <%= form_for @bulk_upload, url: bulk_upload_case_logs_path, method: "post" do |f| %> - <%= f.govuk_error_summary %> - <%= f.govuk_file_field :case_log_bulk_upload, - label: { text: "Bulk Upload", size: "l" }, - hint: { text: "Upload a spreadsheet using the template" } - %> - <%= f.govuk_submit "Upload" %> - <% end %> -
+<% content_for :title, "Bulk upload" %> + +<%= form_for @bulk_upload, url: bulk_upload_case_logs_path, method: "post" do |f| %> + <%= f.govuk_error_summary %> + + <%= f.govuk_file_field :case_log_bulk_upload, + label: { text: content_for(:title), size: "l" }, + hint: { text: "Upload a spreadsheet using the template" } + %> + + <%= f.govuk_submit "Upload" %> +<% end %> diff --git a/app/views/case_logs/edit.html.erb b/app/views/case_logs/edit.html.erb index d387aecea..775a25a1a 100644 --- a/app/views/case_logs/edit.html.erb +++ b/app/views/case_logs/edit.html.erb @@ -1,12 +1,17 @@ <% content_for :title, "Case log #{@case_log.id}" %> + <%= turbo_frame_tag "case_log_form", target: "_top" do %>
-

Tasklist for log - <%= @case_log.id %>

+

+ <%= content_for(:title) %> +

+ +

+ This submission is + <%= @case_log.status.to_s.humanize.downcase %> +

-

This submission is - <%= @case_log.status.to_s.humanize.downcase %>

You’ve completed <%= get_subsections_count(@form, @case_log, :completed) %> of <%= get_subsections_count(@form, @case_log, :all) %> sections.

<% next_incomplete_section = get_next_incomplete_section(@form, @case_log).id %> diff --git a/app/views/case_logs/index.html.erb b/app/views/case_logs/index.html.erb index 07855d687..751ad9afe 100644 --- a/app/views/case_logs/index.html.erb +++ b/app/views/case_logs/index.html.erb @@ -1,9 +1,10 @@ <% content_for :title, "Case logs" %> +

-
-

Your logs

-
+

+ <%= content_for(:title) %> +

<%= govuk_button_link_to "Create new log", case_logs_path, method: :post %> diff --git a/app/views/devise/confirmations/reset.html.erb b/app/views/devise/confirmations/reset.html.erb index 6ad58fa3c..40e8f4871 100644 --- a/app/views/devise/confirmations/reset.html.erb +++ b/app/views/devise/confirmations/reset.html.erb @@ -1,6 +1,11 @@ +<% content_for :title, "Check your email" %> +
-

Check your email

+

+ <%= content_for(:title) %> +

+

We’ve sent a link to reset your password to <%= @email %>.

You’ll only this receive this link if your email address already exists in our system.

If you don’t receive the email within 5 minutes, check your spam or junk folders. Try again if you still haven’t received the email.

diff --git a/app/views/devise/passwords/new.html.erb b/app/views/devise/passwords/new.html.erb index 1fd4e10ab..6f5055ae0 100644 --- a/app/views/devise/passwords/new.html.erb +++ b/app/views/devise/passwords/new.html.erb @@ -1,3 +1,5 @@ +<% content_for :title, "Reset password" %> + <% content_for :before_content do %> <%= govuk_back_link( text: 'Back', @@ -10,7 +12,9 @@
<%= f.govuk_error_summary %> -

Reset password

+

+ <%= content_for(:title) %> +

Enter the email address you used to create your account.

We’ll email you a link to reset your password. This link will expire in 3 hours.

diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb index 6e2630b8e..70a4bfc0e 100644 --- a/app/views/devise/sessions/new.html.erb +++ b/app/views/devise/sessions/new.html.erb @@ -1,11 +1,14 @@ -<% content_for :title, "Sign in" %> +<% content_for :title, "Sign in to your account to submit CORE data" %> + <%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
<% flash_to_model_errors(resource) %> <%= f.govuk_error_summary %> -

Sign in to your account to submit CORE data

+

+ <%= content_for(:title) %> +

<%= f.govuk_email_field :email, label: { text: "Email address" }, diff --git a/app/views/form/check_answers.html.erb b/app/views/form/check_answers.html.erb index 942184dd6..1da554189 100644 --- a/app/views/form/check_answers.html.erb +++ b/app/views/form/check_answers.html.erb @@ -1,4 +1,5 @@ -<% content_for :title, "Check answers" %> +<% content_for :title, "#{subsection.id.humanize} - Check your answers" %> + <%= turbo_frame_tag "case_log_form", target: "_top" do %>
@@ -6,12 +7,15 @@ <%= subsection.id.humanize %> Check your answers + <%= display_answered_questions_summary(subsection, @case_log) %> +
<% subsection.applicable_questions(@case_log).each do |question| %> <%= render partial: 'form/check_answers_table', locals: { question: question, case_log: @case_log } %> <% end %>
+ <%= form_with model: @case_log, method: "get" do |f| %> <%= f.govuk_submit "Save and continue" %> <% end %> diff --git a/app/views/form/page.html.erb b/app/views/form/page.html.erb index 72a825957..3be29bc31 100644 --- a/app/views/form/page.html.erb +++ b/app/views/form/page.html.erb @@ -1,4 +1,4 @@ -<% content_for :title, subsection %> +<% content_for :title, page.header.present? ? page.header : page.questions.first().header.html_safe %> <% content_for :before_content do %> <%= govuk_back_link( @@ -16,6 +16,7 @@ <%= page.header %> <% end %> + <%= form_with model: @case_log, url: form_case_log_path(@case_log), method: "post" do |f| %> <%= f.govuk_error_summary %> <% page.questions.map do |question| %> diff --git a/app/views/organisations/show.html.erb b/app/views/organisations/show.html.erb index d554e6596..35a8a0079 100644 --- a/app/views/organisations/show.html.erb +++ b/app/views/organisations/show.html.erb @@ -1,4 +1,5 @@ <% content_for :title, "Your organisation (Details)" %> + <% content_for :tab_title do %> <%= "Details" %> <% end %> diff --git a/app/views/organisations/users.html.erb b/app/views/organisations/users.html.erb index d088445d1..238e76339 100644 --- a/app/views/organisations/users.html.erb +++ b/app/views/organisations/users.html.erb @@ -1,4 +1,5 @@ <% content_for :title, "Your organisation (Users)" %> + <% content_for :tab_title do %> <%= "Users" %> <% end %> diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb index 1d12d702b..3d4d5e7b8 100644 --- a/app/views/users/edit.html.erb +++ b/app/views/users/edit.html.erb @@ -1,3 +1,5 @@ +<% content_for :title, "Change your personal details" %> + <% content_for :before_content do %> <%= govuk_back_link( text: 'Back', @@ -8,7 +10,9 @@ <%= form_for(current_user, as: :user, html: { method: :patch }) do |f| %>
-

Change your personal details

+

+ <%= content_for(:title) %> +

<%= f.govuk_text_field :name, autocomplete: "name" diff --git a/app/views/users/edit_password.html.erb b/app/views/users/edit_password.html.erb index b2b008f3b..e95f4e869 100644 --- a/app/views/users/edit_password.html.erb +++ b/app/views/users/edit_password.html.erb @@ -1,3 +1,5 @@ +<% content_for :title, "Change your password" %> + <% content_for :before_content do %> <%= govuk_back_link( text: 'Back', @@ -8,7 +10,9 @@ <%= form_for(current_user, as: :user, html: { method: :patch }) do |f| %>
-

Change your password

+

+ <%= content_for(:title) %> +

<%= f.govuk_password_field :current_password, label: { text: "Current password" }, diff --git a/app/views/users/new.html.erb b/app/views/users/new.html.erb index 4aacdd6a9..f4c5f2b15 100644 --- a/app/views/users/new.html.erb +++ b/app/views/users/new.html.erb @@ -1,3 +1,5 @@ +<% content_for :title, "Invite user to submit CORE data" %> + <% content_for :before_content do %> <%= govuk_back_link( text: 'Back', @@ -10,7 +12,9 @@
<%= f.govuk_error_summary %> -

Invite user to submit CORE data

+

+ <%= content_for(:title) %> +

<%= f.govuk_text_field :name, autocomplete: "name" diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 97fa5963c..27ecb39e9 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -1,12 +1,15 @@ <% content_for :title, "Your account" %> +

- Your account + <%= content_for(:title) %>

+

Personal details

+ <%= govuk_summary_list do |summary_list| %> <%= summary_list.row do |row| row.key { 'Name' }