From 070989b6c4191c07c704e92ff7a0e6ed8b3dfc1c Mon Sep 17 00:00:00 2001 From: Rachael Booth Date: Fri, 22 Nov 2024 15:05:55 +0000 Subject: [PATCH] Don't show activation buttons for schemes at merged orgs --- app/views/locations/show.html.erb | 2 +- app/views/schemes/show.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/locations/show.html.erb b/app/views/locations/show.html.erb index 8ac8f6b23..f9ba6496c 100644 --- a/app/views/locations/show.html.erb +++ b/app/views/locations/show.html.erb @@ -47,7 +47,7 @@ -<% if @location.scheme.owning_organisation.active? && LocationPolicy.new(current_user, @location).deactivate? %> +<% if @location.scheme.owning_organisation.status == :active && LocationPolicy.new(current_user, @location).deactivate? %> <%= toggle_location_link(@location) %> <% end %> diff --git a/app/views/schemes/show.html.erb b/app/views/schemes/show.html.erb index 6cefa5847..0aa25affc 100644 --- a/app/views/schemes/show.html.erb +++ b/app/views/schemes/show.html.erb @@ -52,7 +52,7 @@ -<% if @scheme.owning_organisation.active? && SchemePolicy.new(current_user, @scheme).deactivate? %> +<% if @scheme.owning_organisation.status == :active && SchemePolicy.new(current_user, @scheme).deactivate? %> <%= toggle_scheme_link(@scheme) %> <% end %>