<% item_label = format_label(@pagy.count, "scheme") %> <% title = format_title(@searched, "Supported housing services", current_user, item_label, @pagy.count, nil) %> <% content_for :title, title %> <%= render partial: "organisations/headings", locals: current_user.support? ? { main: "Supported housing services", sub: nil } : { main: "Supported housing services", sub: current_user.organisation.name } %> <%= render SearchComponent.new(current_user:, search_label: "Search by service name or code", value: @searched) %>
<%= govuk_table do |table| %> <%= table.head do |head| %> <%= head.row do |row| %> <% row.cell(header: true, text: "Code", html_attributes: { scope: "col", }) %> <% row.cell(header: true, text: "Service", html_attributes: { scope: "col", }) %> <% row.cell(header: true, text: "Managing agent", html_attributes: { scope: "col", }) %> <% row.cell(header: true, text: "Created", html_attributes: { scope: "col", }) %> <% end %> <% end %> <% @schemes.each do |scheme| %> <%= table.body do |body| %> <%= body.row do |row| %> <% row.cell(text: scheme.code) %> <% row.cell(text: scheme.service) %> <% row.cell(text: scheme.organisation.name) %> <% row.cell(text: scheme.created_at.to_formatted_s(:govuk_date)) %> <% end %> <% end %> <% end %> <% end %>