Skip to content

Commit

Permalink
Remove unnecessary divs
Browse files Browse the repository at this point in the history
  • Loading branch information
ddippolito committed Nov 29, 2024
1 parent 576a5bb commit 15548a4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ h1.govuk-heading-xl = t("jobseekers.job_applications.heading")
= govuk_button_to t("buttons.start_application"), quick_apply_jobseekers_job_job_application_path(vacancy.id)

.govuk-grid-column-one-third
p.govuk-heading-m = t(".assistance.heading")
.govuk-heading-m = t(".assistance.heading")
p.govuk-body-s = t(".assistance.content_html", privacy_html: govuk_link_to(t(".assistance.privacy"), "https://www.gov.uk/government/publications/privacy-information-education-providers-workforce-including-teachers/privacy-information-education-providers-workforce-including-teachers"), terms_html: govuk_link_to(t(".assistance.terms"), page_path("terms-and-conditions")))
20 changes: 9 additions & 11 deletions app/views/jobseekers/profiles/_summary.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ p class="govuk-!-margin-bottom-3" = jobseeker_status(profile)

- if (job_preferences = profile.job_preferences).present?

div.govuk-!-margin-bottom-5.govuk-section-separator
.govuk-heading-m class="govuk-!-margin-bottom-5"
= t(".job_preferences")
= govuk_summary_list do |summary_list|
- if (roles = job_preferences.roles).present?
Expand All @@ -27,11 +27,11 @@ p class="govuk-!-margin-bottom-3" = jobseeker_status(profile)
- row.with_value text: humanize_array(patterns)

- if profile.about_you.present?
div.govuk-section-separator govuk-!-padding-bottom-2
.govuk-heading-m class="govuk-!-padding-bottom-2"
= t(".about")
p = simple_format profile.about_you

div.govuk-section-separator govuk-!-padding-bottom-3
.govuk-heading-m class="govuk-!-padding-bottom-3"
= t(".contact_details")
dl.govuk-summary-list
.govuk-summary-list__row
Expand All @@ -43,27 +43,25 @@ dl.govuk-summary-list
dd.govuk-summary-list__value = phone_number

- if profile.employments.any?
div.govuk-section-separator
= t(".work_history")
.govuk-heading-m = t(".work_history")
- profile.employments.order(:started_on).reverse_each do |employment|
h3.govuk-heading-s class="govuk-!-padding-bottom-0 govuk-!-margin-bottom-0"
= employment.organisation
p class="govuk-!-margin-bottom-0" = employment.job_title
- if employment.subjects.present?
p class="govuk-!-margin-bottom-0" = employment.subjects
p.govuk-hint #{employment.started_on.to_formatted_s(:month_year)} to #{employment.ended_on&.to_formatted_s(:month_year) || "present"}
hr.govuk-section-break.govuk-section-break--s.govuk-section-break--visible
- class_name = "govuk-!-margin-bottom-3"
hr.govuk-section-break.govuk-section-break--s.govuk-section-break--visible[class=class_name]

- if profile.qualifications.any?
div.govuk-section-separator govuk-!-padding-bottom-3
= t(".qualifications")
.govuk-heading-m class="govuk-!-padding-bottom-3" = t(".qualifications")
= render "jobseekers/qualifications/preview_qualifications", qualifications: profile.qualifications

- if profile.training_and_cpds.any?
div.govuk-section-separator govuk-!-padding-bottom-3
= t(".training_and_cpd")
.govuk-heading-m class="govuk-!-padding-bottom-3" = t(".training_and_cpd")
- profile.training_and_cpds.each do |training|
h3.govuk-heading-s class="govuk-!-padding-bottom-0"
.govuk-heading-s class="govuk-!-padding-bottom-0"
= training.name
- if training.grade
p class="govuk-body govuk-!-margin-bottom-0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@

sign_in_jobseeker_govuk_one_login(jobseeker)
expect(current_path).to eq(new_quick_apply_jobseekers_job_job_application_path(vacancy.id))
expect(page).to have_css("h1", text: I18n.t("jobseekers.job_applications.new_quick_apply.heading"))
expect(page).to have_css("h2", text: I18n.t("jobseekers.job_applications.new_quick_apply.heading"))
end
end
end

0 comments on commit 15548a4

Please sign in to comment.