diff --git a/app/views/case_logs/_log_list.html.erb b/app/views/case_logs/_log_list.html.erb index 95dcc870e..87c5c1ed7 100644 --- a/app/views/case_logs/_log_list.html.erb +++ b/app/views/case_logs/_log_list.html.erb @@ -1,58 +1,70 @@
- - - - - - - - - - + <% end %> + <%= table.head do |head| %> + <%= head.row do |row| %> + <% row.cell(header: true, text: "Log", html_attributes: { + scope: "col", + }) %> + <% row.cell(header: true, text: "Tenant", html_attributes: { + scope: "col", + }) %> + <% row.cell(header: true, text: "Property", html_attributes: { + scope: "col", + }) %> + <% row.cell(header: true, text: "Tenancy starts", html_attributes: { + scope: "col", + }) %> + <% row.cell(header: true, text: "Log created", html_attributes: { + scope: "col", + }) %> + <% row.cell(header: true, text: "Log Status", html_attributes: { + scope: "col", + }) %> <% if current_user.support? %> - - + <% row.cell(header: true, text: "Owning organisation", html_attributes: { + scope: "col", + }) %> + <% row.cell(header: true, text: "Managing organisation", html_attributes: { + scope: "col", + }) %> <% end %> - - - + <% end %> + <% end %> + <%= table.body do |body| %> <% case_logs.map do |log| %> - - - - - - - - <% if current_user.support? %> - - <% end %> - <% end %> - -
+ <%= govuk_table do |table| %> + <%= table.caption(classes: %w[govuk-!-font-size-19 govuk-!-font-weight-regular], id: title.dasherize) do |caption| %> <%= pagy.count %> total <%= title.downcase %> <%= govuk_link_to "Download (CSV)", "/logs.csv", type: "text/csv" %> -
LogTenantPropertyTenancy startsLog createdStatusOwning organisationManaging organisation
- <%= govuk_link_to case_log_path(log) do %> - Log <%= log.id %> + <%= body.row do |row| %> + <% row.cell(header: true, html_attributes: { + scope: "row", + }) do %> + <%= govuk_link_to case_log_path(log) do %> + Log <%= log.id %> + <% end %> + <% end %> + <% row.cell( + text: log.tenant_code? ? log.tenant_code : "–", + classes: "app-!-font-tabular", + ) %> + <% row.cell( + text: log.propcode? ? log.propcode : "–", + classes: "app-!-font-tabular", + ) %> + <% row.cell(text: log.startdate.present? ? log.startdate.to_formatted_s(:govuk_date) : "–") %> + <% row.cell(text: log.created_at.to_formatted_s(:govuk_date)) %> + <% row.cell do %> + <%= status_tag(log.status) %> + <% end %> + <% if current_user.support? %> + <% row.cell(text: log.owning_organisation.name) %> + <% row.cell(text: log.managing_organisation.name) %> <% end %> - - <%= log.tenant_code? ? log.tenant_code : "–" %> - - <%= log.propcode? ? log.propcode : "–" %> - - <%= log.startdate.present? ? log.startdate.to_formatted_s(:govuk_date) : "–" %> - - <%= log.created_at.to_formatted_s(:govuk_date) %> - - <%= status_tag(log.status) %> - - <%= log.owning_organisation.name %> - - <%= log.managing_organisation.name %> -
+ <% end %> + <% end %>