Skip to content

Commit

Permalink
Dont show see all udpdates links for pending stats pages
Browse files Browse the repository at this point in the history
  • Loading branch information
georges1996 committed Feb 6, 2024
1 parent 7e3e1fc commit 139fb83
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions app/presenters/content_item/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,18 @@ def important_metadata
end

def publisher_metadata
{
display_date = content_item["details"]["display_date"]
metadata = {
from:,
first_published: published,
last_updated: updated,
see_updates_link: true,
}

unless display_date.present? && Time.zone.parse(display_date).future?
metadata[:see_updates_link] = true
end

metadata
end
end
end
2 changes: 1 addition & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ en:
pages_in_manual_section: Manual section pages
previous_page: Previous page
search_this_manual: Search this manual
see_all_updates: see all updates
see_all_updates: See all updates
title: "%{title}Guidance"
updated: Updated
updates_amendments: published amendments
Expand Down

0 comments on commit 139fb83

Please sign in to comment.