-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4262 from DFE-Digital/1638-publish-amends-to-cour…
…se-description-tab [1638] publish amends to course description tab
- Loading branch information
Showing
19 changed files
with
128 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
109 changes: 50 additions & 59 deletions
109
app/views/publish/courses/_description_content.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,170 +1,161 @@ | ||
<h2 class="govuk-heading-m">Course information</h2> | ||
<h2 class="govuk-heading-m"> | ||
<%= t("publish.providers.courses.description_content.course_information_heading") %> | ||
</h2> | ||
|
||
<%= govuk_summary_list do |summary_list| %> | ||
<% enrichment_summary( | ||
summary_list, | ||
:course, | ||
"About this course", | ||
t("publish.providers.courses.description_content.about_course_label"), | ||
value_provided?(course.about_course), | ||
%w[about_course], | ||
action_path: course.is_withdrawn? ? nil : about_this_course_publish_provider_recruitment_cycle_course_path(@provider.provider_code, course.recruitment_cycle_year, course.course_code), | ||
action_visually_hidden_text: "details about this course" | ||
action_visually_hidden_text: t("publish.providers.courses.description_content.about_course_hidden_text") | ||
) %> | ||
|
||
<% enrichment_summary( | ||
summary_list, | ||
:course, | ||
t("publish.providers.courses.description_content.how_school_placements_work_label"), | ||
value_provided?(course.how_school_placements_work), | ||
%w[how_school_placements_work], | ||
action_path: course.is_withdrawn? ? nil : school_placements_publish_provider_recruitment_cycle_course_path(@provider.provider_code, course.recruitment_cycle_year, course.course_code), | ||
action_visually_hidden_text: t("publish.providers.courses.description_content.how_school_placements_work_hidden_text") | ||
) %> | ||
|
||
<% enrichment_summary( | ||
summary_list, | ||
:course, | ||
"Interview process", | ||
t("publish.providers.courses.description_content.interview_process_label"), | ||
value_provided?(course.interview_process), | ||
%w[interview_process], | ||
action_path: course.is_withdrawn? ? nil : interview_process_publish_provider_recruitment_cycle_course_path(@provider.provider_code, course.recruitment_cycle_year, course.course_code), | ||
action_visually_hidden_text: "details about the interview process" | ||
action_visually_hidden_text: t("publish.providers.courses.description_content.interview_process_hidden_text") | ||
) %> | ||
|
||
<% enrichment_summary( | ||
summary_list, | ||
:course, | ||
course.placements_heading, | ||
value_provided?(course.how_school_placements_work), | ||
%w[how_school_placements_work], | ||
action_path: course.is_withdrawn? ? nil : school_placements_publish_provider_recruitment_cycle_course_path(@provider.provider_code, course.recruitment_cycle_year, course.course_code), | ||
action_visually_hidden_text: "details about how school placements work" | ||
) %> | ||
<% end %> | ||
|
||
<h2 class="govuk-heading-m"> | ||
<% if course.has_fees? %> | ||
Course length and fees | ||
<% else %> | ||
Course length and salary | ||
<% end %> | ||
</h2> | ||
<h2 class="govuk-heading-m"><%= course.length_and_fees_or_salary_heading %></h2> | ||
|
||
<%= govuk_summary_list do |summary_list| %> | ||
<% if course.has_fees? %> | ||
<% enrichment_summary( | ||
summary_list, | ||
:course, | ||
"Course length", | ||
t("publish.providers.courses.description_content.course_length_label"), | ||
value_provided?(course.length), | ||
%w[course_length], | ||
action_path: course.cannot_change_course_length? ? nil : length_publish_provider_recruitment_cycle_course_path(@provider.provider_code, course.recruitment_cycle_year, course.course_code), | ||
action_visually_hidden_text: "course length" | ||
action_path: course.cannot_change_course_length? ? nil : length_publish_provider_recruitment_cycle_course_path(@provider.provider_code, course.recruitment_cycle_year, course.course_code) | ||
) %> | ||
|
||
<% enrichment_summary( | ||
summary_list, | ||
:course, | ||
"Fee for UK students", | ||
t("publish.providers.courses.description_content.fee_for_uk_students_label"), | ||
value_provided?(number_to_currency(course.fee_uk_eu)), | ||
%w[fee_uk_eu], | ||
action_path: course.is_withdrawn? ? nil : fees_publish_provider_recruitment_cycle_course_path(@provider.provider_code, course.recruitment_cycle_year, course.course_code), | ||
action_visually_hidden_text: "fee for UK students" | ||
action_visually_hidden_text: t("publish.providers.courses.description_content.fee_for_uk_students_hidden_text") | ||
) %> | ||
|
||
<% enrichment_summary( | ||
summary_list, | ||
:course, | ||
"Fee for international students", | ||
t("publish.providers.courses.description_content.fee_for_international_students_label"), | ||
value_provided?(number_to_currency(course.fee_international)), | ||
%w[fee_international], | ||
action_path: course.is_withdrawn? ? nil : fees_publish_provider_recruitment_cycle_course_path(@provider.provider_code, course.recruitment_cycle_year, course.course_code), | ||
action_visually_hidden_text: "fee for international students" | ||
action_path: course.is_withdrawn? ? nil : fees_publish_provider_recruitment_cycle_course_path(@provider.provider_code, course.recruitment_cycle_year, course.course_code) | ||
) %> | ||
|
||
<% enrichment_summary( | ||
summary_list, | ||
:course, | ||
CourseEnrichment.human_attribute_name("fee_details"), | ||
t("publish.providers.courses.description_content.fee_details_label"), | ||
value_provided?(course.fee_details), | ||
%w[fee_details], | ||
action_path: course.is_withdrawn? ? nil : fees_and_financial_support_publish_provider_recruitment_cycle_course_path(@provider.provider_code, course.recruitment_cycle_year, course.course_code), | ||
action_visually_hidden_text: CourseEnrichment.human_attribute_name("fee_details") | ||
action_visually_hidden_text: t("publish.providers.courses.description_content.fee_details_hidden_text") | ||
) %> | ||
|
||
<% if course.financial_support.present? %> | ||
<% enrichment_summary( | ||
summary_list, | ||
:course, | ||
"Financial support you offer", | ||
t("publish.providers.courses.description_content.financial_support_you_offer_label"), | ||
value_provided?(course.financial_support), | ||
%w[financial_support] | ||
) %> | ||
<% end %> | ||
|
||
<% summary_list.with_row(html_attributes: { data: { qa: "course__financial_incentives" } }) do |row| %> | ||
<% row.with_key { "Financial support from the government" } %> | ||
<% row.with_key { t("publish.providers.courses.description_content.financial_incentive_details_label") } %> | ||
<% row.with_value { course.financial_incentive_details } %> | ||
<% row.with_action %> | ||
<% end %> | ||
<% else %> | ||
<% enrichment_summary( | ||
summary_list, | ||
:course, | ||
"Course length", | ||
value_provided?(course.length), | ||
%w[course_length], | ||
action_path: course.cannot_change_course_length? ? nil : length_publish_provider_recruitment_cycle_course_path(@provider.provider_code, course.recruitment_cycle_year, course.course_code), | ||
action_visually_hidden_text: "course length" | ||
) %> | ||
summary_list, | ||
:course, | ||
t("publish.providers.courses.description_content.course_length_label"), | ||
value_provided?(course.length), | ||
%w[course_length], | ||
action_path: course.cannot_change_course_length? ? nil : length_publish_provider_recruitment_cycle_course_path(@provider.provider_code, course.recruitment_cycle_year, course.course_code), | ||
action_visually_hidden_text: t("publish.providers.courses.description_content.course_length_hidden_text") | ||
) %> | ||
|
||
<% enrichment_summary( | ||
summary_list, | ||
:course, | ||
"Salary", | ||
t("publish.providers.courses.description_content.salary_label"), | ||
value_provided?(course.salary_details), | ||
%w[salary_details], | ||
action_path: course.is_withdrawn? ? nil : salary_publish_provider_recruitment_cycle_course_path(@provider.provider_code, course.recruitment_cycle_year, course.course_code), | ||
action_visually_hidden_text: "salary" | ||
action_path: course.is_withdrawn? ? nil : salary_publish_provider_recruitment_cycle_course_path(@provider.provider_code, course.recruitment_cycle_year, course.course_code) | ||
) %> | ||
<% end %> | ||
<% end %> | ||
|
||
<h2 class="govuk-heading-m">Requirements and eligibility</h2> | ||
<h2 class="govuk-heading-m"> | ||
<%= t("publish.providers.courses.description_content.requirements_heading") %> | ||
</h2> | ||
|
||
<%= govuk_summary_list do |summary_list| %> | ||
<% if course.show_degree_requirements_row? %> | ||
<% enrichment_summary( | ||
summary_list, | ||
:course, | ||
"Degree", | ||
t("publish.providers.courses.description_content.degree_label"), | ||
(render DegreeRowContent.new(course:, errors: @errors)), | ||
%w[degree_grade degree_subject_requirements], | ||
truncate_value: false, | ||
action_path: !course.is_withdrawn? && course.degree_section_complete? ? degrees_start_publish_provider_recruitment_cycle_course_path(@provider.provider_code, @provider.recruitment_cycle_year, course.course_code) : nil, | ||
action_visually_hidden_text: "degree" | ||
action_path: !course.is_withdrawn? && course.degree_section_complete? ? degrees_start_publish_provider_recruitment_cycle_course_path(@provider.provider_code, @provider.recruitment_cycle_year, course.course_code) : nil | ||
) %> | ||
<% end %> | ||
|
||
<% enrichment_summary( | ||
summary_list, | ||
:course, | ||
"GCSEs", | ||
t("publish.providers.courses.description_content.gcse_label"), | ||
(render GcseRowContent.new(course:, errors: @errors)), | ||
%w[accept_pending_gcse accept_gcse_equivalency accept_english_gcse_equivalency accept_maths_gcse_equivalency accept_science_gcse_equivalency additional_gcse_equivalencies], | ||
truncate_value: false, | ||
action_path: !course.is_withdrawn? && course.gcse_section_complete? ? gcses_pending_or_equivalency_tests_publish_provider_recruitment_cycle_course_path(@provider.provider_code, @provider.recruitment_cycle_year, course.course_code) : nil, | ||
action_visually_hidden_text: "GCSEs" | ||
action_path: !course.is_withdrawn? && course.gcse_section_complete? ? gcses_pending_or_equivalency_tests_publish_provider_recruitment_cycle_course_path(@provider.provider_code, @provider.recruitment_cycle_year, course.course_code) : nil | ||
) %> | ||
|
||
<% unless @hide_other_requirements %> | ||
<% enrichment_summary( | ||
summary_list, | ||
:course, | ||
"Personal qualities", | ||
t("publish.providers.courses.description_content.personal_qualities_label"), | ||
value_provided?(course.personal_qualities), | ||
%w[personal_qualities], | ||
action_path: course.is_withdrawn? ? nil : "#{requirements_publish_provider_recruitment_cycle_course_path(@provider.provider_code, course.recruitment_cycle_year, course.course_code)}#personal-qualities", | ||
action_visually_hidden_text: "personal qualities" | ||
action_path: course.is_withdrawn? ? nil : "#{requirements_publish_provider_recruitment_cycle_course_path(@provider.provider_code, course.recruitment_cycle_year, course.course_code)}#personal-qualities" | ||
) %> | ||
|
||
<% enrichment_summary( | ||
summary_list, | ||
:course, | ||
"Other requirements", | ||
t("publish.providers.courses.description_content.other_requirements_label"), | ||
value_provided?(course.other_requirements), | ||
%w[other_requirements], | ||
action_path: course.is_withdrawn? ? nil : "#{requirements_publish_provider_recruitment_cycle_course_path(@provider.provider_code, course.recruitment_cycle_year, course.course_code)}#other-requirements", | ||
action_visually_hidden_text: "other requirements" | ||
action_path: course.is_withdrawn? ? nil : "#{requirements_publish_provider_recruitment_cycle_course_path(@provider.provider_code, course.recruitment_cycle_year, course.course_code)}#other-requirements" | ||
) %> | ||
<% end %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.