From fc54cd36f48f5547c25e9a935bc42427c94e9c77 Mon Sep 17 00:00:00 2001 From: gms-gs Date: Mon, 18 Nov 2024 15:05:42 +0000 Subject: [PATCH] Improve results - 1/7 - Remove content from the course results and course summary --- .../courses/summary_component/view.html.erb | 25 +++++++------ .../results/search_result_component.html.erb | 37 +++++++++---------- .../find/results/search_result_component.rb | 6 --- 3 files changed, 31 insertions(+), 37 deletions(-) diff --git a/app/components/find/courses/summary_component/view.html.erb b/app/components/find/courses/summary_component/view.html.erb index 6f8f052739..d3ba9dc321 100644 --- a/app/components/find/courses/summary_component/view.html.erb +++ b/app/components/find/courses/summary_component/view.html.erb @@ -4,19 +4,22 @@ <%= govuk_summary_list(actions: false) do |summary_list| %> <% summary_list.with_row do |row| %> - <% row.with_key(text: t(".fee_or_salary")) %> + <% row.with_key(text: t(".course_fee")) %> <% row.with_value do %> - <%= course.funding %> -
- <%= course.funding_option %> - <% end %> - <% end %> - - <% unless no_fee? %> - <% summary_list.with_row do |row| %> - <% row.with_key(text: t(".course_fee")) %> - <% row.with_value do %> + <% if course.salaried? %> + This course pays a salary. + <% if course.apprenticeship? %> + It is a Teaching Apprenticeship. + <% end %> +
+ There is no fee. + <% elsif course.apprenticeship? %> + This is a Teaching Apprenticeship course that pays a salary. + There is no fee. + <% else %> <%= course.course_fee_content %> +
+ <%= course.funding_option %> <% end %> <% end %> <% end %> diff --git a/app/components/find/results/search_result_component.html.erb b/app/components/find/results/search_result_component.html.erb index 38979763e0..5852365838 100644 --- a/app/components/find/results/search_result_component.html.erb +++ b/app/components/find/results/search_result_component.html.erb @@ -17,18 +17,23 @@ <% end %> <% summary_list.with_row do |row| %> - <% row.with_key(text: t(".fee_or_salary")) %> + <% row.with_key(text: t(".course_fee")) %> <% row.with_value do %> - <%= course.funding %> -
- <%= course.funding_option %> - <% end %> - <% end %> - - <% unless no_fee? %> - <% summary_list.with_row do |row| %> - <% row.with_key(text: t(".course_fee")) %> - <% row.with_value(text: course.course_fee_content) %> + <% if course.salaried? %> + This course pays a salary. + <% if course.apprenticeship? %> + It is a Teaching Apprenticeship. + <% end %> +
+ There is no fee. + <% elsif course.apprenticeship? %> + This is a Teaching Apprenticeship course that pays a salary. + There is no fee. + <% else %> + <%= course.course_fee_content %> +
+ <%= course.funding_option %> + <% end %> <% end %> <% end %> @@ -48,15 +53,7 @@ <% summary_list.with_row do |row| %> <% row.with_key(text: t(".qualification")) %> - <% row.with_value do %> - <% if accredited_provider %> - <%= formatted_qualification %> -
- <%= accredited_provider %> - <% else %> - <%= formatted_qualification %> - <% end %> - <% end %> + <% row.with_value(text: formatted_qualification) %> <% end %> <% summary_list.with_row do |row| %> diff --git a/app/components/find/results/search_result_component.rb b/app/components/find/results/search_result_component.rb index 9365e92c1a..d9d51a248d 100644 --- a/app/components/find/results/search_result_component.rb +++ b/app/components/find/results/search_result_component.rb @@ -84,12 +84,6 @@ def visa_sponsorship_status 'Visas cannot be sponsored' end end - - def accredited_provider - return nil if course.accrediting_provider.blank? - - "QTS ratified by #{helpers.smart_quotes(course.accrediting_provider.provider_name)}" - end end end end