Browse Source

Use clear filters instead

pull/2528/head
Manny Dinssa 2 years ago
parent
commit
fa102b7b69
  1. 2
      app/controllers/schemes_controller.rb
  2. 2
      app/views/form/guidance/_finding_scheme.erb

2
app/controllers/schemes_controller.rb

@ -15,8 +15,6 @@ class SchemesController < ApplicationController
redirect_to schemes_organisation_path(current_user.organisation) unless current_user.support? redirect_to schemes_organisation_path(current_user.organisation) unless current_user.support?
all_visible_schemes = Scheme.visible all_visible_schemes = Scheme.visible
redirect_to clear_filters_url(filter_type: "schemes") and return if params[:reset] == "true"
@pagy, @schemes = pagy(filter_manager.filtered_schemes(all_visible_schemes, search_term, session_filters)) @pagy, @schemes = pagy(filter_manager.filtered_schemes(all_visible_schemes, search_term, session_filters))
@searched = search_term.presence @searched = search_term.presence
@total_count = all_visible_schemes.size @total_count = all_visible_schemes.size

2
app/views/form/guidance/_finding_scheme.erb

@ -1,6 +1,6 @@
<%= govuk_details(summary_text: "Can’t find your scheme?") do %> <%= govuk_details(summary_text: "Can’t find your scheme?") do %>
<p class="govuk-body">Schemes are attached to the organisation that owns the property. Check you have correctly answered question 1 "Which organisation owns this property?"</p> <p class="govuk-body">Schemes are attached to the organisation that owns the property. Check you have correctly answered question 1 "Which organisation owns this property?"</p>
<p class="govuk-body">If your organisation’s schemes were migrated from old CORE, they may have new names and codes. Search by postcode to find your scheme.</p> <p class="govuk-body">If your organisation’s schemes were migrated from old CORE, they may have new names and codes. Search by postcode to find your scheme.</p>
<p class="govuk-body"><%= govuk_link_to("View your organisation’s schemes", schemes_path(reset: true)) %></p> <p class="govuk-body"><%= govuk_link_to("View your organisation’s schemes", clear_filters_url(filter_type: "schemes")) %></p>
<p class="govuk-body"><%= govuk_link_to("Read more about how schemes have changed", scheme_changes_path) %></p> <p class="govuk-body"><%= govuk_link_to("Read more about how schemes have changed", scheme_changes_path) %></p>
<% end %> <% end %>

Loading…
Cancel
Save