>
+
">
<% remove_other_page_errors(@case_log, @page) %>
<%= f.govuk_error_summary %>
@@ -29,14 +29,14 @@
<% end %>
<% @page.non_conditional_questions.map do |question| %>
-
<%= display_question_key_div(@page, question) %> >
+
>
<% if question.read_only? %>
<% end %>
<% if question.type == "interruption_screen" %>
- <%= render partial: "form/#{question.type}_question", locals: { question: question, caption_text: @subsection.label, page_header: @page.header, case_log: @case_log, title_text: @page.title_text, informative_text: @page.informative_text, form: @form, f: f, conditional: false } %>
+ <%= render partial: "form/#{question.type}_question", locals: { question:, caption_text: @subsection.label, page_header: @page.header, case_log: @case_log, title_text: @page.title_text, informative_text: @page.informative_text, form: @form, f:, conditional: false } %>
<% else %>
- <%= render partial: "form/#{question.type}_question", locals: { question: question, caption_text: @subsection.label, page_header: @page.header, case_log: @case_log, f: f, conditional: false } %>
+ <%= render partial: "form/#{question.type}_question", locals: { question:, caption_text: @subsection.label, page_header: @page.header, case_log: @case_log, f:, conditional: false } %>
<% end %>
<% end %>
@@ -44,11 +44,11 @@
<%= f.hidden_field :page, value: @page.id %>
<% if @case_log.form.is_last_question?(@page, @subsection, @case_log) %>
<%= f.govuk_submit "Submit lettings log", accesskey: "s" %>
- <%else %>
+ <% else %>
<% if !@page.id.include?("value_check") %>
- <%= f.govuk_submit "Save and continue", accesskey: "s" %>
+ <%= f.govuk_submit "Save and continue", accesskey: "s" %>
<% end %>
- <%end %>
+ <% end %>
<% end %>
diff --git a/app/views/layouts/_collection_resources.html.erb b/app/views/layouts/_collection_resources.html.erb
index 4b45b0a8d..4be268e7a 100644
--- a/app/views/layouts/_collection_resources.html.erb
+++ b/app/views/layouts/_collection_resources.html.erb
@@ -1,13 +1,16 @@
Collection resources
- <%= render DocumentListComponent.new(items: [{
- name: "Lettings log for tenants (2022/23)",
- href: "https://core.communities.gov.uk/public/download/guides-and-manuals/2022-23%20Lettings%20paper%20form.pdf?download-format=pdf",
- metadata: "PDF, 654 KB, 4 pages"
- }, {
- name: "Lettings log for tenants (2021/22)",
- href: "https://core.communities.gov.uk/public/download/guides-and-manuals/2021_22%20Lettings%20Log.pdf?download-format=pdf",
- metadata: "PDF, 302 KB, 3 pages"
- }]) %>
+ <%= render DocumentListComponent.new(items: [
+ {
+ name: "Lettings log for tenants (2022/23)",
+ href: "https://core.communities.gov.uk/public/download/guides-and-manuals/2022-23%20Lettings%20paper%20form.pdf?download-format=pdf",
+ metadata: "PDF, 654 KB, 4 pages",
+ },
+ {
+ name: "Lettings log for tenants (2021/22)",
+ href: "https://core.communities.gov.uk/public/download/guides-and-manuals/2021_22%20Lettings%20Log.pdf?download-format=pdf",
+ metadata: "PDF, 302 KB, 3 pages",
+ },
+ ]) %>
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index c46d256dd..701c42b95 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -4,21 +4,21 @@
<%= browser_title(yield(:title), @pagy, @admin_user, @user, @organisation, @case_log, @resource) %>
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
- <%= tag :meta, name: 'viewport', content: 'width=device-width, initial-scale=1' %>
- <%= tag :meta, property: 'og:image', content: asset_path('images/govuk-opengraph-image.png') %>
- <%= tag :meta, name: 'theme-color', content: '#0b0c0c' %>
- <%= favicon_link_tag asset_path('images/favicon.ico') %>
- <%= favicon_link_tag asset_path('images/govuk-mask-icon.svg'), rel: 'mask-icon', type: 'image/svg', color: "#0b0c0c" %>
- <%= favicon_link_tag asset_path('images/govuk-apple-touch-icon.png'), rel: 'apple-touch-icon', type: 'image/png' %>
- <%= favicon_link_tag asset_path('images/govuk-apple-touch-icon-152x152.png'), rel: 'apple-touch-icon', type: 'image/png', size: '152x152' %>
- <%= favicon_link_tag asset_path('images/govuk-apple-touch-icon-167x167.png'), rel: 'apple-touch-icon', type: 'image/png', size: '167x167' %>
- <%= favicon_link_tag asset_path('images/govuk-apple-touch-icon-180x180.png'), rel: 'apple-touch-icon', type: 'image/png', size: '180x180' %>
+ <%= tag.meta name: "viewport", content: "width=device-width, initial-scale=1" %>
+ <%= tag.meta property: "og:image", content: asset_path("images/govuk-opengraph-image.png") %>
+ <%= tag.meta name: "theme-color", content: "#0b0c0c" %>
+ <%= favicon_link_tag asset_path("images/favicon.ico") %>
+ <%= favicon_link_tag asset_path("images/govuk-mask-icon.svg"), rel: "mask-icon", type: "image/svg", color: "#0b0c0c" %>
+ <%= favicon_link_tag asset_path("images/govuk-apple-touch-icon.png"), rel: "apple-touch-icon", type: "image/png" %>
+ <%= favicon_link_tag asset_path("images/govuk-apple-touch-icon-152x152.png"), rel: "apple-touch-icon", type: "image/png", size: "152x152" %>
+ <%= favicon_link_tag asset_path("images/govuk-apple-touch-icon-167x167.png"), rel: "apple-touch-icon", type: "image/png", size: "167x167" %>
+ <%= favicon_link_tag asset_path("images/govuk-apple-touch-icon-180x180.png"), rel: "apple-touch-icon", type: "image/png", size: "180x180" %>
<%= stylesheet_link_tag "application" %>
<%= javascript_include_tag "vendor/html5shiv.min.js" %>
- <%= javascript_tag do -%>
- window.html5.elements = 'output';
+
<%= javascript_include_tag "vendor/polyfill-output-value.js" %>
<%= javascript_include_tag "vendor/outerHTML.js" %>
<%= javascript_include_tag "application", defer: true %>
@@ -37,46 +37,45 @@
<%= govuk_skip_link %>
<%= govuk_header(
- logotype: 'GOV.UK',
- service_name: t('service_name'),
- service_url: current_user.nil? ? "/" : '/logs'
- ) do |component|
- if current_user.nil?
- component.navigation_item(text: 'Sign in', href: user_session_path)
- elsif
- component.navigation_item(text: 'Logs', href: case_logs_path)
- component.navigation_item(text: 'Your organisation', href: "/organisations/#{current_user.organisation.id}")
- component.navigation_item(text: 'Your account', href: account_path)
- component.navigation_item(text: 'Sign out', href: destroy_user_session_path)
- end
+ logotype: "GOV.UK",
+ service_name: t("service_name"),
+ service_url: current_user.nil? ? "/" : "/logs",
+ ) do |component|
+ if current_user.nil?
+ component.navigation_item(text: "Sign in", href: user_session_path)
+ else
+ component.navigation_item(text: "Logs", href: case_logs_path)
+ component.navigation_item(text: "Your organisation", href: "/organisations/#{current_user.organisation.id}")
+ component.navigation_item(text: "Your account", href: account_path)
+ component.navigation_item(text: "Sign out", href: destroy_user_session_path)
end
- %>
+ end %>
- <% if flash.notice && !flash.notice.include?('translation missing') %>
+ <% if flash.notice && !flash.notice.include?("translation missing") %>
<%= govuk_notification_banner(
- title_text: 'Success',
+ title_text: "Success",
success: true, title_heading_level: 3,
- title_id: "swanky-notifications") do |notification_banner|
- notification_banner.heading(text: flash.notice)
- end
- %>
+ title_id: "swanky-notifications"
+ ) do |notification_banner|
+ notification_banner.heading(text: flash.notice)
+ end %>
<% end %>
<%= content_for?(:content) ? yield(:content) : yield %>
diff --git a/app/views/layouts/mailer.html.erb b/app/views/layouts/mailer.html.erb
index cbd34d2e9..3aac9002e 100644
--- a/app/views/layouts/mailer.html.erb
+++ b/app/views/layouts/mailer.html.erb
@@ -1,7 +1,7 @@
-
+
diff --git a/app/views/layouts/organisations.html.erb b/app/views/layouts/organisations.html.erb
index b316bf64f..aea5983c3 100644
--- a/app/views/layouts/organisations.html.erb
+++ b/app/views/layouts/organisations.html.erb
@@ -5,7 +5,7 @@
<% items = tab_items(current_user) %>
- <%= render TabNavigationComponent.new(items: items) %>
+ <%= render TabNavigationComponent.new(items:) %>
<%= content_for(:tab_title) %>
diff --git a/app/views/organisations/edit.html.erb b/app/views/organisations/edit.html.erb
index 43d8dab9a..93dafc4a7 100644
--- a/app/views/organisations/edit.html.erb
+++ b/app/views/organisations/edit.html.erb
@@ -2,7 +2,7 @@
<% content_for :before_content do %>
<%= govuk_back_link(
- text: 'Back',
+ text: "Back",
href: :back,
) %>
<% end %>
@@ -15,29 +15,24 @@
<%= f.govuk_text_field :name,
- autocomplete: "name"
- %>
+ autocomplete: "name" %>
<%= f.govuk_text_field :address_line1,
label: { text: "Address line 1" },
- autocomplete: "address-line1"
- %>
+ autocomplete: "address-line1" %>
<%= f.govuk_text_field :address_line2,
label: { text: "Address line 2" },
- autocomplete: "address-line2"
- %>
+ autocomplete: "address-line2" %>
<%= f.govuk_text_field :postcode,
autocomplete: "postal-code",
- width: 10
- %>
+ width: 10 %>
<%= f.govuk_phone_field :phone,
label: { text: "Telephone number" },
autocomplete: "tel",
- width: 20
- %>
+ width: 20 %>
<%= f.govuk_submit "Save changes" %>
diff --git a/app/views/organisations/show.html.erb b/app/views/organisations/show.html.erb
index 8af61268f..f98ea86a9 100644
--- a/app/views/organisations/show.html.erb
+++ b/app/views/organisations/show.html.erb
@@ -10,17 +10,21 @@
<% @organisation.display_attributes.each do |attr| %>
<% if current_user.data_coordinator? && attr[:editable] %>
- <%= summary_list.row do |row|
- row.key { attr[:name].to_s.humanize }
- row.value { simple_format(attr[:value].to_s, {}, wrapper_tag: "div") }
- row.action(visually_hidden_text: 'name', href: edit_organisation_path, html_attributes: { 'data-qa': "change-#{attr[:name]}" })
- end %>
+ <%= summary_list.row do |row| %>
+ <% row.key { attr[:name].to_s.humanize } %>
+ <% row.value { simple_format(attr[:value].to_s, {}, wrapper_tag: "div") } %>
+ <% row.action(
+ visually_hidden_text: "name",
+ href: edit_organisation_path,
+ html_attributes: { "data-qa": "change-#{attr[:name]}" },
+ ) %>
+ <% end %>
<% else %>
- <%= summary_list.row do |row|
- row.key { attr[:name].to_s.humanize }
- row.value { simple_format(attr[:value].to_s, {}, wrapper_tag: "div") }
- row.action()
- end %>
+ <%= summary_list.row do |row| %>
+ <% row.key { attr[:name].to_s.humanize } %>
+ <% row.value { simple_format(attr[:value].to_s, {}, wrapper_tag: "div") } %>
+ <% row.action %>
+ <% end %>
<% end %>
<% end %>
diff --git a/app/views/organisations/users.html.erb b/app/views/organisations/users.html.erb
index 304528016..8c0e5e5d0 100644
--- a/app/views/organisations/users.html.erb
+++ b/app/views/organisations/users.html.erb
@@ -9,19 +9,19 @@
<% end %>
<%= govuk_table do |table| %>
<%= table.head do |head| %>
- <%= head.row do |row|
- row.cell(header: true, text: "Name and email adress")
- row.cell(header: true, text: "Organisation and role")
- row.cell(header: true, text: "Last logged in")
- end %>
+ <%= head.row do |row| %>
+ <% row.cell(header: true, text: "Name and email adress") %>
+ <% row.cell(header: true, text: "Organisation and role") %>
+ <% row.cell(header: true, text: "Last logged in") %>
+ <% end %>
<% end %>
<% @organisation.users.each do |user| %>
<%= table.body do |body| %>
- <%= body.row do |row|
- row.cell(text: simple_format(user_cell(user), {}, wrapper_tag: "div"))
- row.cell(text: simple_format(org_cell(user), {}, wrapper_tag: "div"))
- row.cell(text: user.last_sign_in_at&.to_formatted_s(:govuk_date) )
- end %>
+ <%= body.row do |row| %>
+ <% row.cell(text: simple_format(user_cell(user), {}, wrapper_tag: "div")) %>
+ <% row.cell(text: simple_format(org_cell(user), {}, wrapper_tag: "div")) %>
+ <% row.cell(text: user.last_sign_in_at&.to_formatted_s(:govuk_date)) %>
+ <% end %>
<% end %>
<% end %>
<% end %>
diff --git a/app/views/pagy/_nav.html.erb b/app/views/pagy/_nav.html.erb
index 9aa325e3d..d288ebddc 100644
--- a/app/views/pagy/_nav.html.erb
+++ b/app/views/pagy/_nav.html.erb
@@ -5,7 +5,7 @@
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index 846472ca1..af0aa0599 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -12,70 +12,86 @@
<%= govuk_summary_list do |summary_list| %>
<%= summary_list.row do |row|
- row.key { "Name" }
- row.value { @user.name }
- if can_edit_names?(@user, current_user)
- row.action(visually_hidden_text: "name", href: aliased_user_edit(@user, current_user), html_attributes: { "data-qa": "change-name" })
- else
- row.action()
- end
- end %>
+ row.key { "Name" }
+ row.value { @user.name }
+ if can_edit_names?(@user, current_user)
+ row.action(visually_hidden_text: "name", href: aliased_user_edit(@user, current_user), html_attributes: { "data-qa": "change-name" })
+ else
+ row.action
+ end
+ end %>
- <%= summary_list.row() do |row|
- row.key { "Email address" }
- row.value { @user.email }
- if can_edit_emails?(@user, current_user)
- row.action(visually_hidden_text: "email address", href: aliased_user_edit(@user, current_user), html_attributes: { "data-qa": "change-email-address" })
- else
- row.action()
- end
- end %>
+ <%= summary_list.row do |row|
+ row.key { "Email address" }
+ row.value { @user.email }
+ if can_edit_emails?(@user, current_user)
+ row.action(visually_hidden_text: "email address", href: aliased_user_edit(@user, current_user), html_attributes: { "data-qa": "change-email-address" })
+ else
+ row.action
+ end
+ end %>
<%= summary_list.row do |row|
- row.key { "Password" }
- row.value { "••••••••" }
- if can_edit_password?(@user, current_user)
- row.action(visually_hidden_text: "password", href: edit_password_account_path, html_attributes: { "data-qa": "change-password" })
- else
- row.action()
- end
- end %>
+ row.key { "Password" }
+ row.value { "••••••••" }
+ if can_edit_password?(@user, current_user)
+ row.action(
+ visually_hidden_text: "password",
+ href: edit_password_account_path,
+ html_attributes: { "data-qa": "change-password" },
+ )
+ else
+ row.action
+ end
+ end %>
<%= summary_list.row do |row|
- row.key { "Organisation" }
- row.value { @user.organisation.name }
- row.action()
- end %>
+ row.key { "Organisation" }
+ row.value { @user.organisation.name }
+ row.action
+ end %>
<%= summary_list.row do |row|
- row.key { "Role" }
- row.value { @user.role.humanize }
- if can_edit_roles?(@user, current_user)
- row.action(visually_hidden_text: "role", href: aliased_user_edit(@user, current_user), html_attributes: { "data-qa": "change-role" })
- else
- row.action()
- end
- end %>
+ row.key { "Role" }
+ row.value { @user.role.humanize }
+ if can_edit_roles?(@user, current_user)
+ row.action(
+ visually_hidden_text: "role",
+ href: aliased_user_edit(@user, current_user),
+ html_attributes: { "data-qa": "change-role" },
+ )
+ else
+ row.action
+ end
+ end %>
<%= summary_list.row do |row|
- row.key { "Data protection officer" }
- row.value { @user.is_data_protection_officer? ? "Yes" : "No" }
- if can_edit_dpo?(@user, current_user)
- row.action(visually_hidden_text: "are #{pronoun(@user, current_user)} a data protection officer?", href: aliased_user_edit(@user, current_user), html_attributes: { "data-qa": "change-are-#{pronoun(@user, current_user)}-a-data-protection-officer" })
- else
- row.action()
- end
- end %>
+ row.key { "Data protection officer" }
+ row.value { @user.is_data_protection_officer? ? "Yes" : "No" }
+ if can_edit_dpo?(@user, current_user)
+ row.action(
+ visually_hidden_text: "are #{pronoun(@user, current_user)} a data protection officer?",
+ href: aliased_user_edit(@user, current_user),
+ html_attributes: { "data-qa": "change-are-#{pronoun(@user, current_user)}-a-data-protection-officer" },
+ )
+ else
+ row.action
+ end
+ end %>
<%= summary_list.row do |row|
- row.key { "Key contact" }
- row.value { @user.is_key_contact? ? "Yes" : "No" }
- if can_edit_key_contact?(@user, current_user)
- row.action(visually_hidden_text: "are #{pronoun(@user, current_user)} a key contact?", href: aliased_user_edit(@user, current_user), html_attributes: { "data-qa": "change-are-#{pronoun(@user, current_user)}-a-key-contact" })
- else
- row.action()
- end
- end %>
+ row.key { "Key contact" }
+ row.value { @user.is_key_contact? ? "Yes" : "No" }
+ if can_edit_key_contact?(@user, current_user)
+ row.action(
+ visually_hidden_text: "are #{pronoun(@user, current_user)} a key contact?",
+ href: aliased_user_edit(@user, current_user),
+ html_attributes: { "data-qa": "change-are-#{pronoun(@user, current_user)}-a-key-contact" },
+ )
+ else
+ row.action
+ end
+ end %>
<% end %>