Skip to content

Commit

Permalink
Merge pull request #1974 from alphagov/travel-advice-callout-differin…
Browse files Browse the repository at this point in the history
…g-county-content

Update callout box
  • Loading branch information
JonathanHallam authored Jan 12, 2021
2 parents 5adafb4 + 4a75251 commit 67f4d9d
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 12 deletions.
4 changes: 4 additions & 0 deletions app/presenters/travel_advice_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ def country_name
content_item["details"]["country"]["name"]
end

def ireland?
country_name == "Ireland"
end

def is_summary?
@part_slug.nil?
end
Expand Down
11 changes: 11 additions & 0 deletions app/views/content_items/_ireland_covid_travel_guidance.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<p class="govuk-body">
<strong>
Under current UK COVID-19 restrictions, you must stay at home. You must not leave home or travel, including internationally, unless you have a legally permitted reason to do so. Check the <a href="/guidance/national-lockdown-stay-at-home">rules that apply to you in England</a>, <a href="https://www.gov.scot/coronavirus-covid-19/">Scotland</a>, <a href="https://gov.wales/covid-19-alert-levels">Wales</a> and <a href="https://www.nidirect.gov.uk/articles/coronavirus-covid-19-regulations-guidance-what-restrictions-mean-you">Northern Ireland</a>.
</strong>
</p>
<p class="govuk-body">
From 15 January, if you intend to <a href="/government/speeches/international-travel-update-11-january-2021">travel to England</a> or <a href="https://www.gov.scot/news/pre-departure-coronavirus-testing-update/">Scotland</a> from outside the Common Travel Area, including UK nationals returning home from travel abroad, you must provide evidence of a negative COVID-19 test result taken up to 3 days before departure. This testing requirement does not apply to travel from Ireland.
</p>
<p class="govuk-body">
If you are legally permitted to travel, <a href="/guidance/travel-advice-novel-coronavirus">check our advice</a> for the country you are visiting. Some other countries have closed borders, and may further restrict movement or bring in new rules including testing requirements with little warning. Before you return to the UK you must <a href="/provide-journey-contact-details-before-travel-uk">provide your journey and contact details</a>. Also check if you need to <a href="/uk-border-control">self-isolate</a>.
</p>
28 changes: 16 additions & 12 deletions app/views/content_items/travel_advice.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,22 @@
} %>
</div>
<div class="travel-advice-notice__content">
<p class="govuk-body">
<strong>
Under current UK COVID-19 restrictions, you must stay at home. You must not leave home or travel, including abroad, unless you have a legally permitted reason to do so.
</strong>
Check the rules that apply to you in <a href="/guidance/national-lockdown-stay-at-home">England</a>, <a href="https://www.gov.scot/coronavirus-covid-19/">Scotland</a>, <a href="https://gov.wales/covid-19-alert-levels">Wales</a> and <a href="https://www.nidirect.gov.uk/articles/coronavirus-covid-19-regulations-guidance-what-restrictions-mean-you">Northern Ireland</a>.
</p>
<p class="govuk-body">
If you are legally permitted to travel, <a href="/guidance/travel-advice-novel-coronavirus">check our advice</a> for the country you are visiting. Other countries have closed borders, and may further restrict movement or bring in new rules including testing requirements with little warning. Before you return to the UK you must <a href="/provide-journey-contact-details-before-travel-uk">provide your journey and contact details</a>. Also check if you need to <a href="/uk-border-control">self isolate</a>.
</p>
<p class="govuk-body">
If you are travelling abroad and wish to return to the UK, contact your airline or travel provider.
</p>
<% if @content_item.ireland? %>
<%= render 'content_items/ireland_covid_travel_guidance' %>
<% else %>
<p class="govuk-body">
<strong>
Under current UK COVID-19 restrictions, you must stay at home. You must not leave home or travel, including internationally, unless you have a legally permitted reason to do so.
</strong>
Check the <a href="/guidance/national-lockdown-stay-at-home">rules that apply to you in England</a>, <a href="https://www.gov.scot/coronavirus-covid-19/">Scotland</a>, <a href="https://gov.wales/covid-19-alert-levels">Wales</a> and <a href="https://www.nidirect.gov.uk/articles/coronavirus-covid-19-regulations-guidance-what-restrictions-mean-you">Northern Ireland</a>.
</p>
<p class="govuk-body">
From 15 January, if you intend to <a href="/government/speeches/international-travel-update-11-january-2021">travel to England</a> or <a href="https://www.gov.scot/news/pre-departure-coronavirus-testing-update/">Scotland</a>, including UK nationals returning home from travel abroad, you must provide evidence of a negative COVID-19 test result taken up to 3 days before departure. If you do not comply (and you do not have a valid exemption) your airline or carrier may refuse you boarding and/or you may be fined on arrival. All other current entry requirements and restrictions continue to apply.
</p>
<p class="govuk-body">
If you are legally permitted to travel, <a href="/guidance/travel-advice-novel-coronavirus">check our advice</a> for the country you are visiting. Some other countries have closed borders, and may further restrict movement or bring in new rules including testing requirements with little warning. Before you return to the UK you must <a href="/provide-journey-contact-details-before-travel-uk">provide your journey and contact details</a>. Also check if you need to <a href="/uk-border-control">self-isolate</a>.
</p>
<% end %>
</div>
</div>

Expand Down
11 changes: 11 additions & 0 deletions test/presenters/travel_advice_presenter_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,17 @@ def schema_name
assert_equal "#{schema_item('full-country')['base_path']}/print", presented_item("full-country").print_link
end

test "presents country name" do
assert_equal schema_item("full-country")["details"]["country"]["name"], presented_item("full-country").country_name
end

test "#ireland?" do
example = schema_item("full-country")
example["details"]["country"]["name"] = "Ireland"

assert_equal true, presented_item("full-country", nil, example).ireland?
end

test "presents only next navigation when on the summary" do
example = schema_item("full-country")
parts = example["details"]["parts"]
Expand Down

0 comments on commit 67f4d9d

Please sign in to comment.