Skip to content

Commit

Permalink
Update provider_record navigation links
Browse files Browse the repository at this point in the history
  • Loading branch information
inulty-dfe committed Jan 14, 2025
1 parent 13ca674 commit fae2b5f
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions app/views/layouts/provider_record.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,20 @@

<div class="govuk-caption-l"><%= Provider.human_attribute_name(@provider.provider_type) %></div>
<h1 class="govuk-heading-l"><%= @provider.name_and_code %></h1>

<% 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 %>
Expand Down

0 comments on commit fae2b5f

Please sign in to comment.