From 480b96dcec2cdeed84d84cd194ae7ee94289e097 Mon Sep 17 00:00:00 2001 From: Tomas D'Stefano Date: Thu, 17 Oct 2024 15:28:53 +0100 Subject: [PATCH] Replace content on school placements page We will only show this page when provider chooses the school placements to be selectable. --- app/controllers/find/placements_controller.rb | 2 +- app/views/shared/courses/_placements.html.erb | 7 +---- config/locales/en.yml | 5 ++-- .../find/placements_controller_spec.rb | 28 +++++++++++++++++++ .../find/search/viewing_a_course_spec.rb | 3 ++ 5 files changed, 35 insertions(+), 10 deletions(-) diff --git a/app/controllers/find/placements_controller.rb b/app/controllers/find/placements_controller.rb index 6ef9176e74..b6d0bd4dae 100644 --- a/app/controllers/find/placements_controller.rb +++ b/app/controllers/find/placements_controller.rb @@ -2,7 +2,7 @@ module Find class PlacementsController < ApplicationController - before_action -> { render_not_found if provider.nil? } + before_action -> { render_not_found if provider.nil? || provider.selectable_school.blank? } def index @course = provider.courses.includes( diff --git a/app/views/shared/courses/_placements.html.erb b/app/views/shared/courses/_placements.html.erb index 7e14fc8d87..9fe9280276 100644 --- a/app/views/shared/courses/_placements.html.erb +++ b/app/views/shared/courses/_placements.html.erb @@ -2,13 +2,8 @@ <%= t(".heading", provider_name: course.provider_name) %> -<%= govuk_warning_text(text: t(".warning")) %> - -

- <%= t(".will_place_you", provider_name: course.provider_name) %> -

-

<%= t(".schools_to_be_placed") %>

+

<%= t(".schools_you_can_choose") %>