diff --git a/app/views/locations/index.html.erb b/app/views/locations/index.html.erb index 8d7b927b2..04e4c4bf6 100644 --- a/app/views/locations/index.html.erb +++ b/app/views/locations/index.html.erb @@ -13,6 +13,8 @@ <%= render SubNavigationComponent.new(items: scheme_items(request.path, @scheme.id, "Locations")) %> +

Locations

+ <%= render SearchComponent.new(current_user:, search_label: "Search by location name or postcode", value: @searched) %> <%= govuk_section_break(visible: true, size: "m") %> diff --git a/app/views/organisations/index.html.erb b/app/views/organisations/index.html.erb index 967c2d0bf..b81922c5e 100644 --- a/app/views/organisations/index.html.erb +++ b/app/views/organisations/index.html.erb @@ -5,8 +5,6 @@ <%= render partial: "organisations/headings", locals: request.path == "/organisations" ? { main: "Organisations", sub: nil } : { main: @organisation.name, sub: "Organisations" } %> -

Organisations

- <% if current_user.support? %> <%= govuk_button_link_to "Create a new organisation", new_organisation_path, html: { method: :get } %> <% end %> diff --git a/app/views/organisations/logs.html.erb b/app/views/organisations/logs.html.erb index 9d8e978dc..10b686f56 100644 --- a/app/views/organisations/logs.html.erb +++ b/app/views/organisations/logs.html.erb @@ -5,11 +5,12 @@ <%= render partial: "organisations/headings", locals: { main: @organisation.name, sub: nil } %> -<%= render SubNavigationComponent.new( - items: secondary_items(request.path, @organisation.id), -) %> - -

Logs

+<% if current_user.support? %> + <%= render SubNavigationComponent.new( + items: secondary_items(request.path, @organisation.id), + ) %> +

Logs

+<% end %>
diff --git a/app/views/organisations/schemes.html.erb b/app/views/organisations/schemes.html.erb index c9cb051eb..8f0510fc5 100644 --- a/app/views/organisations/schemes.html.erb +++ b/app/views/organisations/schemes.html.erb @@ -9,12 +9,11 @@ <%= render SubNavigationComponent.new( items: secondary_items(request.path, @organisation.id), ) %> +

Supported housing schemes

<% end %> <%= govuk_button_link_to "Create a new supported housing scheme", new_scheme_path, html: { method: :post } %> -

Supported housing schemes

- <%= govuk_details( classes: "govuk-!-width-two-thirds", summary_text: "What is a supported housing scheme?", diff --git a/app/views/organisations/show.html.erb b/app/views/organisations/show.html.erb index 5b82aedc7..3227e7b88 100644 --- a/app/views/organisations/show.html.erb +++ b/app/views/organisations/show.html.erb @@ -8,10 +8,9 @@ <%= render SubNavigationComponent.new( items: secondary_items(request.path, @organisation.id), ) %> +

About this organisation

<% end %> -

About this organisation

-
<%= govuk_summary_list do |summary_list| %> diff --git a/app/views/organisations/users.html.erb b/app/views/organisations/users.html.erb index e8dc383ed..c604a1c9f 100644 --- a/app/views/organisations/users.html.erb +++ b/app/views/organisations/users.html.erb @@ -5,11 +5,12 @@ <%= render partial: "organisations/headings", locals: { main: @organisation.name, sub: nil } %> -<%= render SubNavigationComponent.new( - items: secondary_items(request.path, @organisation.id), -) %> - -

Users

+<% if current_user.support? %> + <%= render SubNavigationComponent.new( + items: secondary_items(request.path, @organisation.id), + ) %> +

Users

+<% end %> <% if current_user.data_coordinator? || current_user.support? %> <%= govuk_button_link_to "Invite user", new_user_path(organisation_id: @organisation.id), html: { method: :get } %> diff --git a/app/views/schemes/index.html.erb b/app/views/schemes/index.html.erb index 190d29d3d..ca00be067 100644 --- a/app/views/schemes/index.html.erb +++ b/app/views/schemes/index.html.erb @@ -5,8 +5,6 @@ <%= render partial: "organisations/headings", locals: current_user.support? ? { main: "Supported housing schemes", sub: nil } : { main: "Supported housing schemes", sub: current_user.organisation.name } %> -

Supported housing schemes

- <%= govuk_button_link_to "Create a new supported housing scheme", new_scheme_path, html: { method: :post } %> <%= render SearchComponent.new(current_user:, search_label: "Search by scheme name, code or postcode", value: @searched) %> diff --git a/app/views/schemes/show.html.erb b/app/views/schemes/show.html.erb index 2c700fd14..18eb96b93 100644 --- a/app/views/schemes/show.html.erb +++ b/app/views/schemes/show.html.erb @@ -12,6 +12,8 @@ <%= render SubNavigationComponent.new(items: scheme_items(request.path, @scheme.id, "Locations")) %> +

Scheme

+
<%= govuk_summary_list do |summary_list| %> <% @scheme.display_attributes.each do |attr| %> diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index da05e2905..b30387f5c 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -5,8 +5,6 @@ <%= render partial: "organisations/headings", locals: current_user.support? ? { main: "Users", sub: nil } : { main: "User", sub: current_user.organisation.name } %> -

Users

- <% if current_user.data_coordinator? || current_user.support? %> <%= govuk_button_link_to "Invite user", new_user_path, html: { method: :get } %> <% end %> diff --git a/spec/requests/organisations_controller_spec.rb b/spec/requests/organisations_controller_spec.rb index 357dbb4ba..3d388ee0f 100644 --- a/spec/requests/organisations_controller_spec.rb +++ b/spec/requests/organisations_controller_spec.rb @@ -116,11 +116,6 @@ RSpec.describe OrganisationsController, type: :request do expect(page).to have_field("search", type: "search") end - it "has hidden accessibility field with description" do - expected_field = "

Supported housing schemes

" - expect(CGI.unescape_html(response.body)).to include(expected_field) - end - it "shows only schemes belonging to the same organisation" do expect(page).to have_content(same_org_scheme.id_to_display) schemes.each do |scheme| diff --git a/spec/requests/schemes_controller_spec.rb b/spec/requests/schemes_controller_spec.rb index 8549d79f0..ecf244761 100644 --- a/spec/requests/schemes_controller_spec.rb +++ b/spec/requests/schemes_controller_spec.rb @@ -93,11 +93,6 @@ RSpec.describe SchemesController, type: :request do expect(CGI.unescape_html(response.body)).to match("#{schemes.count} total schemes.") end - it "has hidden accebility field with description" do - expected_field = "

Supported housing schemes

" - expect(CGI.unescape_html(response.body)).to include(expected_field) - end - context "when params scheme_id is present" do it "shows a success banner" do get "/schemes", params: { scheme_id: schemes.first.id }