Skip to content

Commit

Permalink
Hide the transition countdown for a certain page
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-ju committed Dec 11, 2020
1 parent b16a91f commit 0fc3aca
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="gem-c-contextual-sidebar">
<% if navigation.show_brexit_cta? && navigation.step_by_step_count.zero? %>
<%= render 'govuk_publishing_components/components/contextual_sidebar/brexit_cta' %>
<% elsif navigation.step_by_step_count.zero? %>
<% elsif navigation.step_by_step_count.zero? && !navigation.transition_countdown_exception? %>
<%= render 'govuk_publishing_components/components/transition_countdown', {
title: t("components.related_navigation.transition.title"),
url: t("components.related_navigation.transition.link_path"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,23 @@ examples:
- text: Find out what you’ll get
href: "/settled-status-eu-citizens-families/what-settled-and-presettled-status-means"
optional: false
transition_countdown_exception:
data:
content_item:
title: "30 creative teams awarded up to £100,000 each for Festival UK* 2022 R&D project"
content_id: "c3752802-f091-43a9-ba90-33568fccf391"
links:
ordered_related_items:
- title: Find an apprenticeship
base_path: /apply-apprenticeship
- title: Training and study at work
base_path: /training-study-work-your-rights
- title: Careers helpline for teenagers
base_path: /careers-helpline-for-teenagers
document_collections:
- title: Recruit an apprentice (formerly apprenticeship vacancies)
base_path: /government/collections/apprenticeship-vacancies
document_type: document_collection
- title: The future of jobs and skills
base_path: /government/collections/the-future-of-jobs-and-skills
document_type: document_collection
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,10 @@ def show_brexit_cta?
tagged_to_brexit? && (page_content_id != brexit_start_page_content_id)
end

def transition_countdown_exception?
content_item["content_id"] == "c3752802-f091-43a9-ba90-33568fccf391"
end

def step_by_step_count
step_nav_helper.step_navs.count
end
Expand Down

0 comments on commit 0fc3aca

Please sign in to comment.