diff --git a/app/assets/stylesheets/components/_banner.scss b/app/assets/stylesheets/components/_banner.scss index 55c773b78..5349b2e4c 100644 --- a/app/assets/stylesheets/components/_banner.scss +++ b/app/assets/stylesheets/components/_banner.scss @@ -34,3 +34,7 @@ max-width: 30em; padding-top: govuk-spacing(2); } + +.gem-c-intervention { + margin-top: govuk-spacing(4); +} diff --git a/app/presenters/content_item/recruitment_banner.rb b/app/presenters/content_item/recruitment_banner.rb new file mode 100644 index 000000000..cea488c34 --- /dev/null +++ b/app/presenters/content_item/recruitment_banner.rb @@ -0,0 +1,32 @@ +module ContentItem + module RecruitmentBanner + COST_OF_LIVING_SURVEY_URL = "https://GDSUserResearch.optimalworkshop.com/treejack/cbd7a696cbf57c683cbb2e95b4a36c8a".freeze + SURVEY_URL_MAPPINGS = { + "/guidance/cost-of-living-payment" => COST_OF_LIVING_SURVEY_URL, + "/universal-credit" => COST_OF_LIVING_SURVEY_URL, + "/the-warm-home-discount-scheme" => COST_OF_LIVING_SURVEY_URL, + "/winter-fuel-payment" => COST_OF_LIVING_SURVEY_URL, + "/pay-self-assessment-tax-bill" => COST_OF_LIVING_SURVEY_URL, + "/universal-credit/eligibility" => COST_OF_LIVING_SURVEY_URL, + "/universal-credit/what-youll-get" => COST_OF_LIVING_SURVEY_URL, + "/universal-credit/how-to-claim" => COST_OF_LIVING_SURVEY_URL, + "/winter-fuel-payment/how-much-youll-get" => COST_OF_LIVING_SURVEY_URL, + "/government/publications/autumn-statement-2022-cost-of-living-support-factsheet/cost-of-living-support-factsheet" => COST_OF_LIVING_SURVEY_URL, + "/new-state-pension/what-youll-get" => COST_OF_LIVING_SURVEY_URL, + "/check-if-youre-eligible-for-warm-home-discount" => COST_OF_LIVING_SURVEY_URL, + "/universal-credit/other-financial-support" => COST_OF_LIVING_SURVEY_URL, + "/guidance/getting-the-energy-bills-support-scheme-discount" => COST_OF_LIVING_SURVEY_URL, + "/pension-credit" => COST_OF_LIVING_SURVEY_URL, + "/child-benefit" => COST_OF_LIVING_SURVEY_URL, + }.freeze + + def recruitment_survey_url + cost_of_living_test_url + end + + def cost_of_living_test_url + key = content_item["base_path"] + SURVEY_URL_MAPPINGS[key] + end + end +end diff --git a/app/presenters/content_item_presenter.rb b/app/presenters/content_item_presenter.rb index 682241201..63a068634 100644 --- a/app/presenters/content_item_presenter.rb +++ b/app/presenters/content_item_presenter.rb @@ -1,5 +1,6 @@ class ContentItemPresenter include ContentItem::Withdrawable + include ContentItem::RecruitmentBanner attr_reader :content_item, :requested_path, :view_context, diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index db6cdc318..e013177c5 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -31,7 +31,14 @@