From fae2b5f97b9bf7e6dffa26ce1df8688e44245f28 Mon Sep 17 00:00:00 2001 From: Iain McNulty Date: Fri, 20 Dec 2024 09:08:41 +0000 Subject: [PATCH] Update provider_record navigation links --- app/views/layouts/provider_record.html.erb | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/provider_record.html.erb b/app/views/layouts/provider_record.html.erb index 9da8b899d9..22ba9a591e 100644 --- a/app/views/layouts/provider_record.html.erb +++ b/app/views/layouts/provider_record.html.erb @@ -10,13 +10,20 @@
<%= Provider.human_attribute_name(@provider.provider_type) %>

<%= @provider.name_and_code %>

- + <% accredited_tab = [{ url: "", name: "" }] %> + <% unless @provider.accredited_provider? %> + <% if Settings.features.provider_partnerships %> + <% accredited_tab = [{ name: "Accredited partnerships", url: support_recruitment_cycle_provider_accredited_partners_path(@provider.recruitment_cycle_year, @provider) }] %> + <% else %> + <% accredited_tab = [{ name: "Accredited providers", url: support_recruitment_cycle_provider_accredited_providers_path(@provider.recruitment_cycle_year, @provider) }] %> + <% end %> + <% end %> <%= render TabNavigation.new(items: [ { name: "Details", url: support_recruitment_cycle_provider_path(@provider.recruitment_cycle_year, @provider) }, { name: "Users", url: support_recruitment_cycle_provider_users_path(@provider.recruitment_cycle_year, @provider) }, { name: "Courses", url: support_recruitment_cycle_provider_courses_path(@provider.recruitment_cycle_year, @provider) }, { name: "Schools", url: support_recruitment_cycle_provider_schools_path(@provider.recruitment_cycle_year, @provider) }, - *([{ name: "Accredited providers", url: support_recruitment_cycle_provider_accredited_providers_path(@provider.recruitment_cycle_year, @provider) }] unless @provider.accredited_provider?) + *accredited_tab ]) %> <%= yield %>