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