From 6262db8d4b1271c3c2f61cc39b0cba242ef31e25 Mon Sep 17 00:00:00 2001 From: Simon Hughesdon Date: Tue, 11 Aug 2020 08:52:27 +0100 Subject: [PATCH] Update brexit notice We wanted to be able to display multiple lines of text. [Content update](https://docs.google.com/document/d/1jfwDr-G4NP0HKDfNKA5FG2POGjeH1JVK7qGrA4Fj7FE/edit#) [Trello card](https://trello.com/c/ijTzb33b/347-tweak-the-brexit-banner-on-whitehall-pages) --- app/presenters/content_item/no_deal_notice.rb | 5 +++-- app/views/components/_header-notice.html.erb | 8 +++++++- test/components/header_notice_test.rb | 8 ++++++++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/app/presenters/content_item/no_deal_notice.rb b/app/presenters/content_item/no_deal_notice.rb index 76138bd3b..da514ebc0 100644 --- a/app/presenters/content_item/no_deal_notice.rb +++ b/app/presenters/content_item/no_deal_notice.rb @@ -23,11 +23,12 @@ def no_deal_notice_links end def no_deal_notice_title - "The UK has left the EU and the transition period after Brexit comes to an end this year." + "New rules for January 2021" end def no_deal_notice_description - "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, 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."] end def no_deal_notice_link_intro diff --git a/app/views/components/_header-notice.html.erb b/app/views/components/_header-notice.html.erb index 3b5c2a62c..1131424ca 100644 --- a/app/views/components/_header-notice.html.erb +++ b/app/views/components/_header-notice.html.erb @@ -12,7 +12,13 @@
-

<%= description %>

+ <% if description.is_a? Array %> + <% description.map do |line| %> +

<%= line %>

+ <% end %> + <% else %> +

<%= description %>

+ <% end %> <% if links.any? %>