returngovuk_button_link_to"Deactivate this location",scheme_location_new_deactivation_path(location.scheme,location),warning:trueiflocation.active?||location.deactivates_in_a_long_time?
returngovuk_button_link_to"Deactivate this location",scheme_location_new_deactivation_path(location.scheme,location),warning:trueiflocation.active?||location.deactivates_in_a_long_time?
returngovuk_button_link_to"Reactivate this location",scheme_location_new_reactivation_path(location.scheme,location)iflocation.deactivated?
returngovuk_button_link_to"Reactivate this location",scheme_location_new_reactivation_path(location.scheme,location)iflocation.deactivated?&&!location.deactivated_by_scheme?
returngovuk_button_link_to"Deactivate this scheme",scheme_new_deactivation_path(scheme),warning:trueifscheme.active?||scheme.deactivates_in_a_long_time?
returngovuk_button_link_to"Deactivate this scheme",scheme_new_deactivation_path(scheme),warning:trueifscheme.active?||scheme.deactivates_in_a_long_time?
returngovuk_button_link_to"Reactivate this scheme",scheme_new_reactivation_path(scheme)ifscheme.deactivated?
returngovuk_button_link_to"Reactivate this scheme",scheme_new_reactivation_path(scheme)ifscheme.deactivated?||scheme.deactivating_soon?
end
end
defdelete_scheme_link(scheme)
defdelete_scheme_link(scheme)
@ -76,6 +76,15 @@ module SchemesHelper
end
end
end
end
defscheme_status_hint(scheme)
casescheme.status
when:deactivating_soon
"This scheme deactivates on #{scheme.last_deactivation_date.to_formatted_s(:govuk_date)}. Any locations you add will be deactivated on the same date. Reactivate the scheme to add locations active after this date."
when:deactivated
"This scheme deactivated on #{scheme.last_deactivation_date.to_formatted_s(:govuk_date)}. Any locations you add will be deactivated on the same date. Reactivate the scheme to add locations active after this date."
This change will affect <%= sentence_parts.join(' and ') %>.
</h1>
<% if @affected_logs.count > 0 %>
<p>
<%= pluralize(@affected_logs.count, 'existing log') %> using this scheme <%= @affected_logs.count == 1 ? 'has' : 'have' %> a tenancy start date after <%= @deactivation_date.to_formatted_s(:govuk_date) %>.
This scheme has <%= pluralize(@affected_locations.count, 'location') %> active on <%= @deactivation_date.to_formatted_s(:govuk_date) %>. <%= @affected_locations.count == 1 ? 'This location' : 'These locations' %> will deactivate on that date. If the scheme is ever reactivated, <%= @affected_locations.count == 1 ? 'this location' : 'these locations' %> will reactivate as well.