Browse Source

Update scheme table styling and labels

CLDC-2640-location-guidance
Kat 1 year ago
parent
commit
34fd0c11cf
  1. 1
      app/frontend/styles/_table-group.scss
  2. 2
      app/views/organisations/schemes.html.erb
  3. 6
      app/views/schemes/_scheme_list.html.erb
  4. 2
      app/views/schemes/index.html.erb
  5. 4
      spec/features/schemes_spec.rb

1
app/frontend/styles/_table-group.scss

@ -9,7 +9,6 @@
margin-bottom: -1px;
}
.govuk-table__header,
.govuk-table__cell {
white-space: nowrap;
}

2
app/views/organisations/schemes.html.erb

@ -23,7 +23,7 @@
) %>
<%= render partial: "schemes/scheme_filters" %>
<div class="app-filter-layout__content">
<%= render SearchComponent.new(current_user:, search_label: "Search by scheme name, code, postcode or location name", value: @searched) %>
<%= render SearchComponent.new(current_user:, search_label: "Search by postcode, scheme name, scheme code or location name", value: @searched) %>
<hr class="govuk-section-break govuk-section-break--visible govuk-section-break--m">

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

@ -5,8 +5,9 @@
<% end %>
<%= table.head do |head| %>
<%= head.row do |row| %>
<% row.cell(header: true, text: "Scheme", html_attributes: { scope: "col" }) %>
<% row.cell(header: true, text: "Code", html_attributes: { scope: "col" }) %>
<% 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" }) %>
<% end %>
@ -15,6 +16,7 @@
<%= table.body do |body| %>
<%= body.row do |row| %>
<% row.cell(text: simple_format(scheme_cell(scheme), { class: "govuk-!-font-weight-bold" }, 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)) %>

2
app/views/schemes/index.html.erb

@ -11,7 +11,7 @@
<div class="app-filter-layout" data-controller="filter-layout">
<%= render partial: "schemes/scheme_filters" %>
<div class="app-filter-layout__content">
<%= render SearchComponent.new(current_user:, search_label: "Search by scheme name, code, postcode or location name", value: @searched) %>
<%= render SearchComponent.new(current_user:, search_label: "Search by postcode, scheme name, scheme code or location name", value: @searched) %>
<hr class="govuk-section-break govuk-section-break--visible govuk-section-break--m">

4
spec/features/schemes_spec.rb

@ -34,7 +34,7 @@ RSpec.describe "Schemes scheme Features" do
context "when I search for a specific scheme" do
it "there is a search bar with a message and search button for schemes" do
expect(page).to have_field("search")
expect(page).to have_content("Search by scheme name, code, postcode or location name")
expect(page).to have_content("Search by postcode, scheme name, scheme code or location name")
expect(page).to have_button("Search")
end
@ -142,7 +142,7 @@ RSpec.describe "Schemes scheme Features" do
it "displays a search bar" do
expect(page).to have_field("search")
expect(page).to have_content("Search by scheme name, code, postcode or location name")
expect(page).to have_content("Search by postcode, scheme name, scheme code or location name")
expect(page).to have_button("Search")
end

Loading…
Cancel
Save