diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 69b162440..d077e86c3 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -12,6 +12,8 @@ $govuk-include-default-font-face: false; // Components from govuk_publishing_components gem @import "govuk_publishing_components/govuk_frontend_support"; +@import "components/intervention"; + // government-frontend mixins @import "mixins/margins"; diff --git a/app/assets/stylesheets/components/_intervention.scss b/app/assets/stylesheets/components/_intervention.scss new file mode 100644 index 000000000..5767964b3 --- /dev/null +++ b/app/assets/stylesheets/components/_intervention.scss @@ -0,0 +1,3 @@ +.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..a4c457c9b --- /dev/null +++ b/app/presenters/content_item/recruitment_banner.rb @@ -0,0 +1,19 @@ +module ContentItem + module RecruitmentBanner + BRAND_SURVEY_URL = "https://surveys.publishing.service.gov.uk/s/5G06FO/".freeze + SURVEY_URL_MAPPINGS = { + "/repaying-your-student-loan" => BRAND_SURVEY_URL, + "/student-finance" => BRAND_SURVEY_URL, + "/jobseekers-allowance" => BRAND_SURVEY_URL, + }.freeze + + def recruitment_survey_url + brand_user_research_test_url + end + + def brand_user_research_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 850db6aa7..ca3151668 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, diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 8c3eee441..99b0bebdc 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -6,7 +6,14 @@ <% content_for :body do %>