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.
		
		
		
		
		
			
		
			
				
					
					
						
							51 lines
						
					
					
						
							3.2 KiB
						
					
					
				
			
		
		
	
	
							51 lines
						
					
					
						
							3.2 KiB
						
					
					
				| <% item_label = format_label(@pagy.count, "scheme") %> | |
| <% title = format_title(@searched, "Supported housing schemes", current_user, item_label, @pagy.count, @organisation.name) %> | |
|  | |
| <% content_for :title, title %> | |
|  | |
| <%= render partial: "organisations/headings", locals: current_user.support? ? { main: @organisation.name, sub: nil } : { main: "Supported housing schemes", sub: current_user.organisation.name } %> | |
|  | |
| <% if current_user.support? %> | |
|   <%= render SubNavigationComponent.new( | |
|     items: secondary_items(request.path, @organisation.id), | |
|   ) %> | |
|   <h2 class="govuk-visually-hidden">Supported housing schemes</h2> | |
| <% end %> | |
|  | |
| <% if display_duplicate_schemes_banner?(@organisation, current_user) %> | |
|   <%= govuk_notification_banner(title_text: "Important") do %> | |
|     <p class="govuk-notification-banner__heading govuk-!-width-full" style="max-width: fit-content"> | |
|       Some schemes and locations might be duplicates. | |
|     <p> | |
|     <%= govuk_link_to "Review possible duplicates", href: schemes_duplicates_organisation_path(@organisation) %> | |
|   <% end %> | |
| <% end %> | |
|  | |
| <div class="app-filter-layout" data-controller="filter-layout"> | |
|   <% display_actions = SchemePolicy.new(current_user, nil).create? %> | |
|   <div class="govuk-button-group app-filter-toggle <%= "govuk-!-margin-bottom-6" if display_actions %>"> | |
|     <% if display_actions %> | |
|         <%= govuk_button_link_to "Create a new supported housing scheme", new_scheme_path, html: { method: :post } %> | |
|     <% end %> | |
|   </div> | |
|  | |
|   <%= govuk_details( | |
|     classes: "govuk-!-width-two-thirds", | |
|     summary_text: "What is a supported housing scheme?", | |
|     text: "A supported housing scheme (also known as a ‘supported housing service’) provides shared or self-contained housing for a particular client group, for example younger or vulnerable people. A single scheme can contain multiple units, for example bedrooms in shared houses or a bungalow with 3 bedrooms.", | |
|   ) %> | |
|   <%= 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"> | |
|  | |
|     <% if current_user.support? %> | |
|       <%= render partial: "schemes/scheme_list", locals: { schemes: @schemes, title:, pagy: @pagy, searched: @searched, item_label:, total_count: @total_count, schemes_csv_download_url: secondary_schemes_csv_download_url(@organisation, @searched, "schemes"), locations_csv_download_url: secondary_schemes_csv_download_url(@organisation, @searched, "locations"), combined_csv_download_url: secondary_schemes_csv_download_url(@organisation, @searched, "combined") } %> | |
|     <% else %> | |
|       <%= 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") } %> | |
|     <% end %> | |
|  | |
|     <%== render partial: "pagy/nav", locals: { pagy: @pagy, item_name: "schemes" } %> | |
|   </div> | |
| </div>
 | |
| 
 |