diff --git a/app/views/organisations/_organisation_list.html.erb b/app/views/organisations/_organisation_list.html.erb index 55ec8efe1..10bf2aaa6 100644 --- a/app/views/organisations/_organisation_list.html.erb +++ b/app/views/organisations/_organisation_list.html.erb @@ -1,33 +1,28 @@ <% content_for :title, title %> -
- - - - - - - - - - - <% organisations.map do |organisation| %> - - - - - +<%= govuk_table do |table| %> + <%= table.caption(size: "s", classes: %w[govuk-!-text-align-left govuk-!-margin-top-4 govuk-!-margin-bottom-4]) do |caption| %> + + <%= @pagy.count %> total <%= title.downcase %> + + <% end %> + <%= table.head do |head| %> + <%= head.row do |row| %> + <% row.cell(header: true, text: "Name") %> + <% row.cell(header: true, text: "Registration number") %> + <% row.cell(header: true, text: "Type") %> + <% end %> + <% end %> + <% @organisations.each do |organisation| %> + <%= table.body do |body| %> + <%= body.row do |row| %> + <% row.cell do %> + <%= govuk_link_to(organisation.name, "organisations/#{organisation.id}/logs", class: "govuk-!-font-weight-bold") %> + <% end %> + <% row.cell(text: organisation.housing_registration_no) %> + <% row.cell(text: display_provider_type(organisation.provider_type)) %> <% end %> - -
- - <%= pagy.count %> total <%= title.downcase %> - -
NameRegistration numberType
- <%= govuk_link_to organisation.name, "organisations/#{organisation.id}/logs" %> - - <%= organisation.housing_registration_no %> - - <%= display_provider_type(organisation.provider_type) %> -
-
+ <% end %> + <% end %> +<% end %> + diff --git a/spec/requests/organisations_controller_spec.rb b/spec/requests/organisations_controller_spec.rb index 723550908..5b7f98ed9 100644 --- a/spec/requests/organisations_controller_spec.rb +++ b/spec/requests/organisations_controller_spec.rb @@ -419,7 +419,7 @@ RSpec.describe OrganisationsController, type: :request do end it "allows to edit the organisation details" do - expect(page).to have_link("Change", count: 10) + expect(page).to have_link("Change", count: 3) end end end