You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
1.5 KiB
22 lines
1.5 KiB
<% item_label = format_label(@pagy.count, "scheme") %> |
|
<% title = format_title(@searched, "Supported housing schemes", current_user, item_label, @pagy.count, nil) %> |
|
|
|
<% content_for :title, title %> |
|
|
|
<%= render partial: "organisations/headings", locals: current_user.support? ? { main: "Supported housing schemes", sub: nil } : { main: "Supported housing schemes", sub: current_user.organisation.name } %> |
|
|
|
<% if SchemePolicy.new(current_user, nil).create? %> |
|
<%= govuk_button_link_to "Create a new supported housing scheme", new_scheme_path, html: { method: :post } %> |
|
<% end %> |
|
<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 postcode, scheme name, scheme code or location name", value: @searched) %> |
|
|
|
<hr class="govuk-section-break govuk-section-break--visible govuk-section-break--m"> |
|
|
|
<%= render partial: "schemes/scheme_list", locals: { schemes: @schemes, title:, pagy: @pagy, searched: @searched, item_label:, total_count: @total_count, schemes_csv_download_url: primary_schemes_csv_download_url(@searched, "schemes"), locations_csv_download_url: primary_schemes_csv_download_url(@searched, "locations"), combined_csv_download_url: primary_schemes_csv_download_url(@searched, "combined") } %> |
|
|
|
<%== render partial: "pagy/nav", locals: { pagy: @pagy, item_name: "schemes" } %> |
|
</div> |
|
</div>
|
|
|