Browse Source

Lint ERB templates

pull/498/head
Paul Robert Lloyd 3 years ago
parent
commit
6e3ee6368a
  1. 2
      app/views/case_logs/_tasklist.html.erb
  2. 2
      app/views/form/check_answers.html.erb
  3. 10
      app/views/form/review.html.erb
  4. 12
      app/views/layouts/application.html.erb

2
app/views/case_logs/_tasklist.html.erb

@ -23,4 +23,4 @@
</ul>
</li>
<% end %>
</ol>
</ol>

2
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,
} %>

10
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" => "",
}) %>
<div class="govuk-grid-row">
@ -13,15 +13,15 @@
<p class="govuk-body">
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 : "" %>.
</p>
<% @case_log.form.sections.map do |section| %>
<% @case_log.form.sections.map do |section| %>
<h2 class="govuk-heading-m"><%= section.label %></h2>
<% section.subsections.map do |subsection| %>
<% section.subsections.map do |subsection| %>
<div class="x-govuk-summary-card govuk-!-margin-bottom-6">
<div class="x-govuk-summary-card__header">
<h3 class="x-govuk-summary-card__title"><%= subsection.label %></h3>
</div>
<div class="x-govuk-summary-card__body">
<%= render partial: 'form/check_answers_summary_list', locals: {
<%= render partial: "form/check_answers_summary_list", locals: {
subsection:,
case_log: @case_log,
} %>

12
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:) %>

Loading…
Cancel
Save