From 6e3ee6368a402522d9c50bf9e15dc1da7893cbd9 Mon Sep 17 00:00:00 2001 From: Paul Robert Lloyd Date: Mon, 25 Apr 2022 16:52:46 +0100 Subject: [PATCH] Lint ERB templates --- app/views/case_logs/_tasklist.html.erb | 2 +- app/views/form/check_answers.html.erb | 2 +- app/views/form/review.html.erb | 10 +++++----- app/views/layouts/application.html.erb | 12 ++++++------ 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/views/case_logs/_tasklist.html.erb b/app/views/case_logs/_tasklist.html.erb index b371a361f..42adcd340 100644 --- a/app/views/case_logs/_tasklist.html.erb +++ b/app/views/case_logs/_tasklist.html.erb @@ -23,4 +23,4 @@ <% end %> - \ No newline at end of file + diff --git a/app/views/form/check_answers.html.erb b/app/views/form/check_answers.html.erb index 8f5d425a0..45ecaf9a2 100644 --- a/app/views/form/check_answers.html.erb +++ b/app/views/form/check_answers.html.erb @@ -17,7 +17,7 @@ <% end %> <%= display_answered_questions_summary(subsection, @case_log) %> - <%= render partial: 'form/check_answers_summary_list', locals: { + <%= render partial: "form/check_answers_summary_list", locals: { subsection:, case_log: @case_log, } %> diff --git a/app/views/form/review.html.erb b/app/views/form/review.html.erb index 19e8498d6..e8ff06a1f 100644 --- a/app/views/form/review.html.erb +++ b/app/views/form/review.html.erb @@ -1,8 +1,8 @@ <% content_for :title, "Review lettings log" %> <% content_for :breadcrumbs, govuk_breadcrumbs(breadcrumbs: { "Logs" => "/logs", - "Log #{@case_log.id.to_s}" => "/logs/" + @case_log.id.to_s, - "Review lettings log" => "" + "Log #{@case_log.id}" => "/logs/#{@case_log.id}", + "Review lettings log" => "", }) %>
@@ -13,15 +13,15 @@

You can review and make changes to this log up to 3 months after the end of the current collection year, which closes on 31 March <%= @case_log.collection_start_year.present? ? @case_log.collection_start_year + 1 : "" %>.

- <% @case_log.form.sections.map do |section| %> + <% @case_log.form.sections.map do |section| %>

<%= section.label %>

- <% section.subsections.map do |subsection| %> + <% section.subsections.map do |subsection| %>

<%= subsection.label %>

- <%= render partial: 'form/check_answers_summary_list', locals: { + <%= render partial: "form/check_answers_summary_list", locals: { subsection:, case_log: @case_log, } %> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index ec5305c79..acbd16816 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -45,7 +45,7 @@ <%= govuk_header( classes: "app-header", service_url: current_user.nil? ? "/" : "/logs", - navigation_classes: "govuk-header__navigation--end" + navigation_classes: "govuk-header__navigation--end", ) do |component| component.product_name(name: t("service_name")) if current_user.nil? @@ -68,14 +68,14 @@ <% if current_user.support? %> <% items = [ { name: "Organisations", url: "/organisations", comparable_urls: ["/details", "/organisations"] }, - { name: "Users", url: "/users", comparable_urls: ["/users", "/account"] }, - { name: "Logs", url: case_logs_path, comparable_urls: ["/logs"] }, + { name: "Users", url: "/users", comparable_urls: ["/users", "/account"] }, + { name: "Logs", url: case_logs_path, comparable_urls: ["/logs"] }, ] %> <% else %> <% items = [ - { name: "Logs", url: case_logs_path, comparable_urls: ["/logs"] }, - { name: "Users", url: users_organisation_path(current_user.organisation), comparable_urls: ["/users", "/account"] }, - { name: "About your organisation", url: "/organisations/#{current_user.organisation.id}", comparable_urls: ["/details"] }, + { name: "Logs", url: case_logs_path, comparable_urls: ["/logs"] }, + { name: "Users", url: users_organisation_path(current_user.organisation), comparable_urls: ["/users", "/account"] }, + { name: "About your organisation", url: "/organisations/#{current_user.organisation.id}", comparable_urls: ["/details"] }, ] %> <% end %> <%= render PrimaryNavigationComponent.new(items:) %>