Skip to content

Commit

Permalink
Update transition call out box as a result of a deal with the EU
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosa-Fox committed Dec 24, 2020
1 parent 53de089 commit 1e49a56
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
14 changes: 7 additions & 7 deletions app/presenters/content_item/no_deal_notice.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ def no_deal_notice_links
end

def no_deal_notice_title
"New rules for January 2021"
"Brexit transition: new rules for 2021"
end

def no_deal_notice_description
["The UK has left the EU, and the transition period after Brexit comes to an end this year.",
"This page tells you what you'll need to do from 1 January 2021. It will be updated if anything changes."]
["The UK has left the EU. This page tells you the new rules from 1 January 2021.",
"It will be updated if there’s new information about the UK’s deal with the EU that affects what you need to do."]
end

def no_deal_notice_link_intro
Expand All @@ -40,13 +40,13 @@ def no_deal_landing_page_cta
"module": "track-click",
"track-category": "no_deal_notice",
"track-action": "/transition",
"track-label": "the transition period",
"track-label": "Get your personalised list of actions",
}

featured_link = view_context.link_to("the transition period", "/transition", data: data_attributes, class: "govuk-link")
featured_link_intro = no_deal_notice_links.any? ? "You can also read about" : "Check what else you need to do during"
featured_link = view_context.link_to("Get your personalised list of actions", "/transition", data: data_attributes, class: "govuk-link")
featured_link_text = " and subscribe to email updates to find out when things change."

(featured_link_intro + " " + featured_link + ".").html_safe
(featured_link + featured_link_text).html_safe
end

def no_deal_links
Expand Down
7 changes: 4 additions & 3 deletions app/views/components/_header-notice.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
<% else %>
<p class="app-c-header-notice__text govuk-body"><%= description %></p>
<% end %>
<% if featured_link %>
<p class="app-c-header-notice__text govuk-body"><%= featured_link %></p>
<% end %>
<% if links.any? %>
<div class="app-c-header-notice__links">
<% if links.count == 1 %>
Expand All @@ -37,9 +40,7 @@
</div>
<% end %>

<% if featured_link %>
<p class="app-c-header-notice__text govuk-body"><%= featured_link %></p>
<% end %>

</div>
</section>
<% end %>

0 comments on commit 1e49a56

Please sign in to comment.