Skip to content

Commit

Permalink
Set up DWP user research banner
Browse files Browse the repository at this point in the history
  • Loading branch information
beccapearce committed Mar 18, 2024
1 parent f09d815 commit 23b5739
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/controllers/browse_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
class BrowseController < ApplicationController
slimmer_template "gem_layout_full_width"
include RecruitmentBannerHelper

def index
page = MainstreamBrowsePage.find("/browse")
Expand Down
1 change: 1 addition & 0 deletions app/controllers/organisations_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
class OrganisationsController < ApplicationController
skip_before_action :set_expiry
include RecruitmentBannerHelper
before_action do
set_expiry content_item.max_age, public_cache: content_item.public_cache
end
Expand Down
3 changes: 2 additions & 1 deletion app/views/browse/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<% add_view_stylesheet("browse") %>
<% content_for :title, page.title %>
<%= render 'shared/tag_meta', tag: page %>
Expand All @@ -20,6 +19,8 @@
} %>
<% end %>
<%= render partial: 'shared/intervention_banner' %>
<%= render "shared/browse_header", { margin_bottom: page.slug == "benefits" ? 7 : 9 } do %>
<h1 class="browse__heading govuk-heading-xl">
<%= page.title %>
Expand Down
1 change: 1 addition & 0 deletions app/views/organisations/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<%= render partial: 'meta', locals: { organisation: @organisation } %>
<%= render partial: 'breadcrumb' %>
<%= render partial: 'shared/intervention_banner' %>
<%= render partial: 'header' %>
<%= render 'govuk_publishing_components/components/machine_readable_metadata',
schema: :organisation,
Expand Down
7 changes: 7 additions & 0 deletions lib/data/recruitment_banners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,10 @@
# - /foreign-travel-advice

banners:
- name: DWP user research banner
suggestion_text: Help improve GOV.UK
suggestion_link_text: Take part in user research (opens in a new tab)
survey_url: https://forms.office.com/e/CkfCRwdLQj
page_paths:
- /government/organisations/department-for-work-pensions
- /browse/benefits

0 comments on commit 23b5739

Please sign in to comment.