Browse Source

Update tables and header

update-version-test
Kat 12 months ago
parent
commit
82a8ddc063
  1. 24
      app/components/bulk_upload_error_row_component.html.erb
  2. 14
      app/components/bulk_upload_error_summary_table_component.html.erb
  3. 28
      app/views/duplicate_logs/index.html.erb
  4. 10
      app/views/layouts/application.html.erb
  5. 26
      app/views/locations/index.html.erb
  6. 28
      app/views/logs/_delete_logs_table_lettings.html.erb
  7. 28
      app/views/logs/_delete_logs_table_sales.html.erb
  8. 28
      app/views/logs/update_logs.html.erb
  9. 8
      app/views/merge_requests/organisations.html.erb
  10. 10
      app/views/organisation_relationships/_managing_agent_list.erb
  11. 10
      app/views/organisation_relationships/_stock_owner_list.erb
  12. 18
      app/views/organisations/_merged_organisation_details.html.erb
  13. 26
      app/views/organisations/_organisation_list.html.erb
  14. 30
      app/views/schemes/_scheme_list.html.erb
  15. 22
      app/views/users/_user_list.html.erb

24
app/components/bulk_upload_error_row_component.html.erb

@ -9,21 +9,21 @@
<div class="govuk-summary-card__content">
<%= govuk_table do |table| %>
<% table.head do |head| %>
<% head.row do |row| %>
<% row.cell(header: true, text: "Cell") %>
<% row.cell(header: true, text: "Question") %>
<% row.cell(header: true, text: "Error") %>
<% row.cell(header: true, text: "Specification") %>
<% table.with_head do |head| %>
<% head.with_row do |row| %>
<% row.with_cell(header: true, text: "Cell") %>
<% row.with_cell(header: true, text: "Question") %>
<% row.with_cell(header: true, text: "Error") %>
<% row.with_cell(header: true, text: "Specification") %>
<% end %>
<% table.body do |body| %>
<% table.with_body do |body| %>
<% bulk_upload_errors.each do |error| %>
<% body.row do |row| %>
<% row.cell(header: true, text: error.cell) %>
<% row.cell(text: question_for_field(error.field)) %>
<% row.cell(text: error.error) %>
<% row.cell(text: error.field.humanize) %>
<% body.with_row do |row| %>
<% row.with_cell(header: true, text: error.cell) %>
<% row.with_cell(text: question_for_field(error.field)) %>
<% row.with_cell(text: error.error) %>
<% row.with_cell(text: error.field.humanize) %>
<% end %>
<% end %>
<% end %>

14
app/components/bulk_upload_error_summary_table_component.html.erb

@ -4,16 +4,16 @@
<% sorted_errors.each do |error| %>
<%= govuk_table do |table| %>
<% table.head do |head| %>
<% head.row do |row| %>
<% row.cell(text: question_for_field(error[0][1].to_sym), header: true) %>
<% row.cell(text: "Column #{error[0][0]}", header: true, numeric: true) %>
<% table.with_head do |head| %>
<% head.with_row do |row| %>
<% row.with_cell(text: question_for_field(error[0][1].to_sym), header: true) %>
<% row.with_cell(text: "Column #{error[0][0]}", header: true, numeric: true) %>
<% end %>
<% table.body do |body| %>
<% body.row do |row| %>
<% row.cell(text: error[0][2]) %>
<% row.cell(text: pluralize(error[1], "error"), numeric: true) %>
<% body.with_row do |row| %>
<% row.with_cell(text: error[0][2]) %>
<% row.with_cell(text: pluralize(error[1], "error"), numeric: true) %>
<% end %>
<% end %>
<% end %>

28
app/views/duplicate_logs/index.html.erb

@ -11,28 +11,28 @@
</div>
<%= govuk_table do |table| %>
<%= table.head do |head| %>
<%= head.row do |row| %>
<% row.cell header: true, text: "Type of logs" %>
<% row.cell header: true, text: "Log IDs" %>
<% row.cell header: true %>
<%= table.with_head do |head| %>
<%= head.with_row do |row| %>
<% row.with_cell header: true, text: "Type of logs" %>
<% row.with_cell header: true, text: "Log IDs" %>
<% row.with_cell header: true %>
<% end %>
<% end %>
<%= table.body do |body| %>
<%= table.with_body do |body| %>
<% @duplicates[:lettings].each do |duplicate_set| %>
<% body.row do |row| %>
<% row.cell text: "Lettings" %>
<% row.cell text: duplicate_set.map { |id| "Log #{id}" }.join(", ") %>
<% row.cell do %>
<% body.with_row do |row| %>
<% row.with_cell text: "Lettings" %>
<% row.with_cell text: duplicate_set.map { |id| "Log #{id}" }.join(", ") %>
<% row.with_cell do %>
<%= govuk_link_to "Review logs", lettings_log_duplicate_logs_path(duplicate_set.first, original_log_id: duplicate_set.first, referrer: params[:referrer], organisation_id: params[:organisation_id]) %>
<% end %>
<% end %>
<% end %>
<% @duplicates[:sales].each do |duplicate_set| %>
<% body.row do |row| %>
<% row.cell text: "Sales" %>
<% row.cell text: duplicate_set.map { |id| "Log #{id}" }.join(", ") %>
<% row.cell do %>
<% body.with_row do |row| %>
<% row.with_cell text: "Sales" %>
<% row.with_cell text: duplicate_set.map { |id| "Log #{id}" }.join(", ") %>
<% row.with_cell do %>
<%= govuk_link_to "Review logs", sales_log_duplicate_logs_path(duplicate_set.first, original_log_id: duplicate_set.first, referrer: params[:referrer], organisation_id: params[:organisation_id]) %>
<% end %>
<% end %>

10
app/views/layouts/application.html.erb

@ -87,16 +87,16 @@
<%= govuk_header(
classes: govuk_header_classes(current_user),
service_url: current_user.nil? ? root_path : logs_path,
homepage_url: current_user.nil? ? root_path : logs_path,
navigation_classes: "govuk-header__navigation--end",
) do |component|
component.product_name(name: t("service_name"))
component.with_product_name(name: t("service_name"))
unless FeatureToggle.service_moved? || FeatureToggle.service_unavailable?
if current_user.nil?
component.navigation_item(text: "Sign in", href: user_session_path)
component.with_navigation_item(text: "Sign in", href: user_session_path)
else
component.navigation_item(text: "Your account", href: account_path)
component.navigation_item(text: "Sign out", href: destroy_user_session_path)
component.with_navigation_item(text: "Your account", href: account_path)
component.with_navigation_item(text: "Sign out", href: destroy_user_session_path)
end
end
end %>

26
app/views/locations/index.html.erb

@ -29,36 +29,36 @@
<%= govuk_section_break(visible: true, size: "m") %>
<%= govuk_table do |table| %>
<%= table.caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %>
<%= table.with_caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %>
<%= render(SearchResultCaptionComponent.new(searched: @searched, count: @pagy.count, item_label:, total_count: @total_count, item: "locations", filters_count: applied_filters_count(@filter_type))) %>
<% end %>
<%= table.head do |head| %>
<%= head.row do |row| %>
<% row.cell(header: true, text: "Postcode", html_attributes: {
<%= table.with_head do |head| %>
<%= head.with_row do |row| %>
<% row.with_cell(header: true, text: "Postcode", html_attributes: {
scope: "col",
}) %>
<% row.cell(header: true, text: "Name", html_attributes: {
<% row.with_cell(header: true, text: "Name", html_attributes: {
scope: "col",
}) %>
<% row.cell(header: true, text: "Location code", html_attributes: {
<% row.with_cell(header: true, text: "Location code", html_attributes: {
scope: "col",
}) %>
<% row.cell(header: true, text: "Status", html_attributes: {
<% row.with_cell(header: true, text: "Status", html_attributes: {
scope: "col",
}) %>
<% end %>
<% end %>
<% @locations.each do |location| %>
<%= table.body do |body| %>
<%= body.row do |row| %>
<% row.cell(text: simple_format(location_cell_postcode(location, if location.confirmed
<%= table.with_body do |body| %>
<%= body.with_row do |row| %>
<% row.with_cell(text: simple_format(location_cell_postcode(location, if location.confirmed
scheme_location_path(@scheme, location)
else
location.postcode.present? ? scheme_location_check_answers_path(@scheme, location, route: "locations") : scheme_location_postcode_path(@scheme, location)
end), { class: "govuk-!-font-weight-bold" }, wrapper_tag: "div")) %>
<% row.cell(text: location.name) %>
<% row.cell(text: location.id) %>
<% row.cell(text: status_tag_from_resource(location)) %>
<% row.with_cell(text: location.name) %>
<% row.with_cell(text: location.id) %>
<% row.with_cell(text: status_tag_from_resource(location)) %>
<% end %>
<% end %>
<% end %>

28
app/views/logs/_delete_logs_table_lettings.html.erb

@ -1,24 +1,24 @@
<%= govuk_table do |table| %>
<% table.head do |head| %>
<% head.row do |row| %>
<% row.cell header: true, text: "Log ID" %>
<% row.cell header: true, text: "Tenancy code" %>
<% row.cell header: true, text: "Property reference" %>
<% row.cell header: true, text: "Status" %>
<% row.cell header: true, text: "Delete?" %>
<% table.with_head do |head| %>
<% head.with_row do |row| %>
<% row.with_cell header: true, text: "Log ID" %>
<% row.with_cell header: true, text: "Tenancy code" %>
<% row.with_cell header: true, text: "Property reference" %>
<% row.with_cell header: true, text: "Status" %>
<% row.with_cell header: true, text: "Delete?" %>
<% end %>
<% end %>
<% table.body do |body| %>
<% table.with_body do |body| %>
<% f.govuk_check_boxes_fieldset :selected_ids, small: true do %>
<% delete_logs_form.logs.each do |log| %>
<% body.row do |row| %>
<% row.cell do %>
<% body.with_row do |row| %>
<% row.with_cell do %>
<%= govuk_link_to log.id, url_for(log) %>
<% end %>
<% row.cell text: log.tenancycode %>
<% row.cell text: log.propcode %>
<% row.cell text: status_tag(log.status) %>
<% row.cell html_attributes: { class: "checkbox-cell" } do %>
<% row.with_cell text: log.tenancycode %>
<% row.with_cell text: log.propcode %>
<% row.with_cell text: status_tag(log.status) %>
<% row.with_cell html_attributes: { class: "checkbox-cell" } do %>
<% f.govuk_check_box :selected_ids, log.id,
label: { text: log.id, hidden: true },
checked: delete_logs_form.selected_ids.include?(log.id) %>

28
app/views/logs/_delete_logs_table_sales.html.erb

@ -1,24 +1,24 @@
<%= govuk_table do |table| %>
<% table.head do |head| %>
<% head.row do |row| %>
<% row.cell header: true, text: "Log ID" %>
<% row.cell header: true, text: "Purchaser code" %>
<% row.cell header: true, text: "Sale completion date" %>
<% row.cell header: true, text: "Status" %>
<% row.cell header: true, text: "Delete?" %>
<% table.with_head do |head| %>
<% head.with_row do |row| %>
<% row.with_cell header: true, text: "Log ID" %>
<% row.with_cell header: true, text: "Purchaser code" %>
<% row.with_cell header: true, text: "Sale completion date" %>
<% row.with_cell header: true, text: "Status" %>
<% row.with_cell header: true, text: "Delete?" %>
<% end %>
<% end %>
<% table.body do |body| %>
<% table.with_body do |body| %>
<% f.govuk_check_boxes_fieldset :selected_ids, small: true do %>
<% delete_logs_form.logs.each do |log| %>
<% body.row do |row| %>
<% row.cell do %>
<% body.with_row do |row| %>
<% row.with_cell do %>
<%= govuk_link_to log.id, url_for(log) %>
<% end %>
<% row.cell text: log.purchid %>
<% row.cell text: log.saledate&.to_formatted_s(:govuk_date) %>
<% row.cell text: status_tag(log.status) %>
<% row.cell html_attributes: { class: "checkbox-cell" } do %>
<% row.with_cell text: log.purchid %>
<% row.with_cell text: log.saledate&.to_formatted_s(:govuk_date) %>
<% row.with_cell text: status_tag(log.status) %>
<% row.with_cell html_attributes: { class: "checkbox-cell" } do %>
<% f.govuk_check_box :selected_ids, log.id,
label: { text: log.id, hidden: true },
checked: delete_logs_form.selected_ids.include?(log.id) %>

28
app/views/logs/update_logs.html.erb

@ -14,23 +14,23 @@
<% else %>
<%= render partial: "organisations/headings", locals: { main: "You need to update #{@total_count} logs", sub: "" } %>
<%= govuk_table do |table| %>
<% table.head do |head| %>
<% head.row do |row| %>
<% row.cell(header: true, text: "Log ID") %>
<% row.cell(header: true, text: "Tenancy code") %>
<% row.cell(header: true, text: "Property reference") %>
<% row.cell(header: true, text: "Status") %>
<% row.cell(header: true, text: "") %>
<% table.with_head do |head| %>
<% head.with_row do |row| %>
<% row.with_cell(header: true, text: "Log ID") %>
<% row.with_cell(header: true, text: "Tenancy code") %>
<% row.with_cell(header: true, text: "Property reference") %>
<% row.with_cell(header: true, text: "Status") %>
<% row.with_cell(header: true, text: "") %>
<% end %>
<% end %>
<% @logs.each do |log| %>
<% table.body do |body| %>
<% body.row do |row| %>
<% row.cell(text: log.id) %>
<% row.cell(text: log.tenancycode) %>
<% row.cell(text: log.propcode) %>
<% row.cell(text: status_tag(log.status)) %>
<% row.cell(html_attributes: {
<% table.with_body do |body| %>
<% body.with_row do |row| %>
<% row.with_cell(text: log.id) %>
<% row.with_cell(text: log.tenancycode) %>
<% row.with_cell(text: log.propcode) %>
<% row.with_cell(text: status_tag(log.status)) %>
<% row.with_cell(html_attributes: {
scope: "row",
class: "govuk-!-text-align-right",
}) do %>

8
app/views/merge_requests/organisations.html.erb

@ -23,10 +23,10 @@
<%= f.govuk_submit "Add organisation", classes: "govuk-button--secondary" %>
<%= govuk_table do |table| %>
<% @merge_request.merging_organisations.order(:name).each do |merging_organisation| %>
<%= table.body do |body| %>
<%= body.row do |row| %>
<% row.cell(text: merging_organisation.name) %>
<% row.cell(html_attributes: {
<%= table.with_body do |body| %>
<%= body.with_row do |row| %>
<% row.with_cell(text: merging_organisation.name) %>
<% row.with_cell(html_attributes: {
scope: "row",
class: "govuk-!-text-align-right",
}) do %>

10
app/views/organisation_relationships/_managing_agent_list.erb

@ -1,14 +1,14 @@
<section class="app-table-group" tabindex="0" aria-labelledby="<%= title.dasherize %>">
<%= govuk_table do |table| %>
<%= table.caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %>
<%= table.with_caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %>
<%= render(SearchResultCaptionComponent.new(searched:, count: pagy.count, item_label:, total_count:, item: "agents", filters_count: 0)) %>
<% end %>
<% @managing_agents.each do |managing_agent| %>
<%= table.body do |body| %>
<%= body.row do |row| %>
<% row.cell(text: managing_agent.name) %>
<%= table.with_body do |body| %>
<%= body.with_row do |row| %>
<% row.with_cell(text: managing_agent.name) %>
<% if current_user.data_coordinator? || current_user.support? %>
<% row.cell(html_attributes: {
<% row.with_cell(html_attributes: {
scope: "row",
class: "govuk-!-text-align-right",
}) do %>

10
app/views/organisation_relationships/_stock_owner_list.erb

@ -1,14 +1,14 @@
<section class="app-table-group" tabindex="0" aria-labelledby="<%= title.dasherize %>">
<%= govuk_table do |table| %>
<%= table.caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %>
<%= table.with_caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %>
<%= render(SearchResultCaptionComponent.new(searched:, count: pagy.count, item_label:, total_count:, item: "stock owners", filters_count: 0)) %>
<% end %>
<% @stock_owners.each do |stock_owner| %>
<%= table.body do |body| %>
<%= body.row do |row| %>
<% row.cell(text: stock_owner.name) %>
<%= table.with_body do |body| %>
<%= body.with_row do |row| %>
<% row.with_cell(text: stock_owner.name) %>
<% if current_user.data_coordinator? || current_user.support? %>
<% row.cell(html_attributes: {
<% row.with_cell(html_attributes: {
scope: "row",
class: "govuk-!-text-align-right",
}) do %>

18
app/views/organisations/_merged_organisation_details.html.erb

@ -3,21 +3,21 @@
<% @organisation.recently_absorbed_organisations_grouped_by_merge_date.each do |merge_date, organisations| %>
<p><strong>Merge date:</strong> <%= merge_date&.to_formatted_s(:govuk_date) %></p>
<%= govuk_table do |table| %>
<%= table.head do |head| %>
<%= head.row do |row| %>
<% row.cell(header: true, text: "Organisation name", html_attributes: { scope: "col", class: "govuk-!-width-one-half" }) %>
<% row.cell(header: true, text: "Organisation ID", html_attributes: { scope: "col", class: "govuk-!-width-one-half" }) %>
<%= table.with_head do |head| %>
<%= head.with_row do |row| %>
<% row.with_cell(header: true, text: "Organisation name", html_attributes: { scope: "col", class: "govuk-!-width-one-half" }) %>
<% row.with_cell(header: true, text: "Organisation ID", html_attributes: { scope: "col", class: "govuk-!-width-one-half" }) %>
<% end %>
<% end %>
<% organisations.each do |absorbed_org| %>
<%= table.body do |body| %>
<%= body.row do |row| %>
<%= table.with_body do |body| %>
<%= body.with_row do |row| %>
<% if current_user.support? %>
<% row.cell(text: simple_format(govuk_link_to(absorbed_org.name, organisation_path(absorbed_org)), { class: "govuk-!-font-weight-bold scheme-name-cell" }, wrapper_tag: "div")) %>
<% row.with_cell(text: simple_format(govuk_link_to(absorbed_org.name, organisation_path(absorbed_org)), { class: "govuk-!-font-weight-bold scheme-name-cell" }, wrapper_tag: "div")) %>
<% else %>
<% row.cell(text: absorbed_org.name) %>
<% row.with_cell(text: absorbed_org.name) %>
<% end %>
<% row.cell(text: "ORG#{absorbed_org.id}") %>
<% row.with_cell(text: "ORG#{absorbed_org.id}") %>
<% end %>
<% end %>
<% end %>

26
app/views/organisations/_organisation_list.html.erb

@ -1,35 +1,35 @@
<section class="app-table-group" tabindex="0" aria-labelledby="<%= title.dasherize %>">
<%= govuk_table do |table| %>
<%= table.caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %>
<%= table.with_caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %>
<%= render(SearchResultCaptionComponent.new(searched:, count: pagy.count, item_label:, total_count:, item: "organisations", filters_count: applied_filters_count(@filter_type))) %>
<% end %>
<%= table.head do |head| %>
<%= head.row do |row| %>
<% row.cell(header: true, text: "Name", html_attributes: {
<%= table.with_head do |head| %>
<%= head.with_row do |row| %>
<% row.with_cell(header: true, text: "Name", html_attributes: {
scope: "col",
}) %>
<% row.cell(header: true, text: "Registration number", html_attributes: {
<% row.with_cell(header: true, text: "Registration number", html_attributes: {
scope: "col",
}) %>
<% row.cell(header: true, text: "Type", html_attributes: {
<% row.with_cell(header: true, text: "Type", html_attributes: {
scope: "col",
}) %>
<% row.cell(header: true, text: "Status", html_attributes: {
<% row.with_cell(header: true, text: "Status", html_attributes: {
scope: "col",
}) %>
<% end %>
<% end %>
<% @organisations.each do |organisation| %>
<%= table.body do |body| %>
<%= body.row do |row| %>
<% row.cell(header: true, html_attributes: {
<%= table.with_body do |body| %>
<%= body.with_row do |row| %>
<% row.with_cell(header: true, html_attributes: {
scope: "row",
}) do %>
<%= govuk_link_to(organisation.name, "organisations/#{organisation.id}/lettings-logs") %>
<% end %>
<% row.cell(text: organisation.housing_registration_no) %>
<% row.cell(text: organisation.display_provider_type) %>
<% row.cell(text: status_tag(organisation.status)) %>
<% row.with_cell(text: organisation.housing_registration_no) %>
<% row.with_cell(text: organisation.display_provider_type) %>
<% row.with_cell(text: status_tag(organisation.status)) %>
<% end %>
<% end %>
<% end %>

30
app/views/schemes/_scheme_list.html.erb

@ -1,6 +1,6 @@
<section class="app-table-group" tabindex="0" aria-labelledby="<%= title.dasherize %>">
<%= govuk_table do |table| %>
<%= table.caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %>
<%= table.with_caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %>
<span class="app-search__caption">
<%= render(SearchResultCaptionComponent.new(searched:, count: pagy.count, item_label:, total_count:, item: "schemes", filters_count: applied_filters_count(@filter_type))) %>
<% if @schemes&.any? %>
@ -10,23 +10,23 @@
<% end %>
</span>
<% end %>
<%= table.head do |head| %>
<%= head.row do |row| %>
<% row.cell(header: true, text: "Scheme", html_attributes: { scope: "col", class: "govuk-!-width-one-quarter" }) %>
<% row.cell(header: true, text: "Stock owner", html_attributes: { scope: "col" }) %>
<% row.cell(header: true, text: "Scheme code", html_attributes: { scope: "col" }) %>
<% row.cell(header: true, text: "Locations", html_attributes: { scope: "col" }) %>
<% row.cell(header: true, text: "Status", html_attributes: { scope: "col" }) %>
<%= table.with_head do |head| %>
<%= head.with_row do |row| %>
<% row.with_cell(header: true, text: "Scheme", html_attributes: { scope: "col", class: "govuk-!-width-one-quarter" }) %>
<% row.with_cell(header: true, text: "Stock owner", html_attributes: { scope: "col" }) %>
<% row.with_cell(header: true, text: "Scheme code", html_attributes: { scope: "col" }) %>
<% row.with_cell(header: true, text: "Locations", html_attributes: { scope: "col" }) %>
<% row.with_cell(header: true, text: "Status", html_attributes: { scope: "col" }) %>
<% end %>
<% end %>
<% @schemes.each do |scheme| %>
<%= table.body do |body| %>
<%= body.row do |row| %>
<% row.cell(text: simple_format(scheme_cell(scheme), { class: "govuk-!-font-weight-bold scheme-name-cell" }, wrapper_tag: "div")) %>
<% row.cell(text: scheme.owning_organisation&.name) %>
<% row.cell(text: scheme.id_to_display) %>
<% row.cell(text: scheme.locations&.count) %>
<% row.cell(text: status_tag_from_resource(scheme)) %>
<%= table.with_body do |body| %>
<%= body.with_row do |row| %>
<% row.with_cell(text: simple_format(scheme_cell(scheme), { class: "govuk-!-font-weight-bold scheme-name-cell" }, wrapper_tag: "div")) %>
<% row.with_cell(text: scheme.owning_organisation&.name) %>
<% row.with_cell(text: scheme.id_to_display) %>
<% row.with_cell(text: scheme.locations&.count) %>
<% row.with_cell(text: status_tag_from_resource(scheme)) %>
<% end %>
<% end %>
<% end %>

22
app/views/users/_user_list.html.erb

@ -1,29 +1,29 @@
<section class="app-table-group" tabindex="0" aria-labelledby="<%= title.dasherize %>">
<%= govuk_table do |table| %>
<%= table.caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %>
<%= table.with_caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular]) do |caption| %>
<%= render(SearchResultCaptionComponent.new(searched:, count: pagy.count, item_label:, total_count:, item: "users", filters_count: applied_filters_count(@filter_type))) %>
<% if current_user.support? %>
<% query = searched.present? ? "?search=#{searched}" : nil %>
<%= govuk_link_to "Download (CSV)", "#{request.path}.csv#{query}", type: "text/csv", style: "white-space: nowrap" %>
<% end %>
<% end %>
<%= table.head do |head| %>
<%= head.row do |row| %>
<% row.cell(header: true, text: "Name and email address", html_attributes: {
<%= table.with_head do |head| %>
<%= head.with_row do |row| %>
<% row.with_cell(header: true, text: "Name and email address", html_attributes: {
scope: "col",
}) %>
<% row.cell(header: true, text: "Organisation and role", html_attributes: {
<% row.with_cell(header: true, text: "Organisation and role", html_attributes: {
scope: "col",
}) %>
<% row.cell(header: true, text: "Last logged in", html_attributes: {
<% row.with_cell(header: true, text: "Last logged in", html_attributes: {
scope: "col",
}) %>
<% end %>
<% end %>
<% users.each do |user| %>
<%= table.body do |body| %>
<%= body.row do |row| %>
<% row.cell(header: true, html_attributes: {
<%= table.with_body do |body| %>
<%= body.with_row do |row| %>
<% row.with_cell(header: true, html_attributes: {
scope: "row",
}) do %>
<%= simple_format(user_cell(user), {}, wrapper_tag: "span") %>
@ -49,8 +49,8 @@
<%= "" %>
<% end %>
<% end %>
<% row.cell(text: simple_format(org_cell(user), {}, wrapper_tag: "div")) %>
<% row.cell(text: user.active? ? user.last_sign_in_at&.to_formatted_s(:govuk_date) : "Deactivated") %>
<% row.with_cell(text: simple_format(org_cell(user), {}, wrapper_tag: "div")) %>
<% row.with_cell(text: user.active? ? user.last_sign_in_at&.to_formatted_s(:govuk_date) : "Deactivated") %>
<%= govuk_link_to users_path(user) do %>
<span class="govuk-visually-hidden">User </span><%= user.id %>
<% end %>

Loading…
Cancel
Save