govuk_publishing_components 27.16.0 → 27.20.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/govuk_publishing_components/image-card-srcset/cop26-170.jpg +0 -0
  3. data/app/assets/images/govuk_publishing_components/image-card-srcset/cop26-240.jpg +0 -0
  4. data/app/assets/images/govuk_publishing_components/image-card-srcset/cop26-320.jpg +0 -0
  5. data/app/assets/images/govuk_publishing_components/image-card-srcset/cop26-480.jpg +0 -0
  6. data/app/assets/images/govuk_publishing_components/image-card-srcset/cop26.jpg +0 -0
  7. data/app/assets/javascripts/govuk_publishing_components/analytics/explicit-cross-domain-links.js +49 -48
  8. data/app/assets/javascripts/govuk_publishing_components/analytics/page-content.js +74 -65
  9. data/app/assets/javascripts/govuk_publishing_components/components/cookie-banner.js +0 -1
  10. data/app/assets/javascripts/govuk_publishing_components/components/single-page-notification-button.js +25 -11
  11. data/app/assets/stylesheets/govuk_publishing_components/_all_components.scss +1 -0
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_big-number.scss +1 -6
  13. data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss +19 -14
  14. data/app/assets/stylesheets/govuk_publishing_components/components/_image-card.scss +17 -7
  15. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +10 -109
  16. data/app/assets/stylesheets/govuk_publishing_components/components/_search.scss +24 -14
  17. data/app/assets/stylesheets/govuk_publishing_components/components/_signup-link.scss +34 -0
  18. data/app/assets/stylesheets/govuk_publishing_components/components/_single-page-notification-button.scss +8 -0
  19. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_tables.scss +8 -4
  20. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_warning-callout.scss +7 -0
  21. data/app/assets/stylesheets/govuk_publishing_components/components/mixins/_grid-helper.scss +141 -0
  22. data/app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb +5 -1
  23. data/app/views/govuk_publishing_components/components/_cookie_banner.html.erb +1 -1
  24. data/app/views/govuk_publishing_components/components/_image_card.html.erb +1 -0
  25. data/app/views/govuk_publishing_components/components/_intervention.html.erb +10 -1
  26. data/app/views/govuk_publishing_components/components/_search.html.erb +1 -0
  27. data/app/views/govuk_publishing_components/components/_signup_link.html.erb +30 -0
  28. data/app/views/govuk_publishing_components/components/_single_page_notification_button.html.erb +1 -1
  29. data/app/views/govuk_publishing_components/components/contextual_sidebar/_brexit_cta.html.erb +3 -3
  30. data/app/views/govuk_publishing_components/components/contextual_sidebar/_covid_cta.html.erb +27 -0
  31. data/app/views/govuk_publishing_components/components/docs/contextual_sidebar.yml +15 -87
  32. data/app/views/govuk_publishing_components/components/docs/image_card.yml +29 -0
  33. data/app/views/govuk_publishing_components/components/docs/intervention.yml +9 -0
  34. data/app/views/govuk_publishing_components/components/docs/search.yml +3 -0
  35. data/app/views/govuk_publishing_components/components/docs/signup_link.yml +39 -0
  36. data/app/views/govuk_publishing_components/components/layout_header/_header_logo.html.erb +1 -1
  37. data/config/i18n-tasks.yml +8 -0
  38. data/config/locales/ar.yml +134 -131
  39. data/config/locales/az.yml +131 -131
  40. data/config/locales/be.yml +136 -130
  41. data/config/locales/bg.yml +135 -131
  42. data/config/locales/bn.yml +132 -131
  43. data/config/locales/cs.yml +136 -131
  44. data/config/locales/cy.yml +129 -125
  45. data/config/locales/da.yml +132 -131
  46. data/config/locales/de.yml +135 -131
  47. data/config/locales/dr.yml +133 -131
  48. data/config/locales/el.yml +131 -131
  49. data/config/locales/en.yml +19 -14
  50. data/config/locales/es-419.yml +131 -131
  51. data/config/locales/es.yml +131 -131
  52. data/config/locales/et.yml +134 -131
  53. data/config/locales/fa.yml +130 -131
  54. data/config/locales/fi.yml +133 -131
  55. data/config/locales/fr.yml +130 -130
  56. data/config/locales/gd.yml +133 -131
  57. data/config/locales/gu.yml +131 -131
  58. data/config/locales/he.yml +131 -131
  59. data/config/locales/hi.yml +131 -131
  60. data/config/locales/hr.yml +133 -131
  61. data/config/locales/hu.yml +134 -131
  62. data/config/locales/hy.yml +135 -131
  63. data/config/locales/id.yml +132 -131
  64. data/config/locales/is.yml +131 -131
  65. data/config/locales/it.yml +131 -131
  66. data/config/locales/ja.yml +128 -131
  67. data/config/locales/ka.yml +134 -131
  68. data/config/locales/kk.yml +131 -131
  69. data/config/locales/ko.yml +13 -17
  70. data/config/locales/lt.yml +136 -131
  71. data/config/locales/lv.yml +135 -131
  72. data/config/locales/ms.yml +131 -131
  73. data/config/locales/mt.yml +133 -131
  74. data/config/locales/nl.yml +131 -131
  75. data/config/locales/no.yml +131 -131
  76. data/config/locales/pa-pk.yml +128 -132
  77. data/config/locales/pa.yml +131 -131
  78. data/config/locales/pl.yml +135 -131
  79. data/config/locales/ps.yml +128 -131
  80. data/config/locales/pt.yml +131 -131
  81. data/config/locales/ro.yml +132 -131
  82. data/config/locales/ru.yml +135 -131
  83. data/config/locales/si.yml +131 -131
  84. data/config/locales/sk.yml +136 -131
  85. data/config/locales/sl.yml +138 -131
  86. data/config/locales/so.yml +131 -131
  87. data/config/locales/sq.yml +131 -131
  88. data/config/locales/sr.yml +133 -131
  89. data/config/locales/sv.yml +131 -131
  90. data/config/locales/sw.yml +131 -131
  91. data/config/locales/ta.yml +132 -131
  92. data/config/locales/th.yml +130 -131
  93. data/config/locales/tk.yml +132 -131
  94. data/config/locales/tr.yml +132 -131
  95. data/config/locales/uk.yml +138 -131
  96. data/config/locales/ur.yml +128 -131
  97. data/config/locales/uz.yml +133 -131
  98. data/config/locales/vi.yml +131 -131
  99. data/config/locales/zh-hk.yml +130 -131
  100. data/config/locales/zh-tw.yml +130 -131
  101. data/config/locales/zh.yml +130 -131
  102. data/lib/govuk_publishing_components/presenters/contextual_navigation.rb +42 -170
  103. data/lib/govuk_publishing_components/presenters/image_card_helper.rb +11 -1
  104. data/lib/govuk_publishing_components/presenters/single_page_notification_button_helper.rb +3 -1
  105. data/lib/govuk_publishing_components/version.rb +1 -1
  106. metadata +12 -2
@@ -1,48 +1,51 @@
1
1
  ---
2
2
  zh:
3
3
  common:
4
- translations:
4
+ translations: 翻译
5
5
  components:
6
6
  accordion:
7
- hide:
8
- hide_all:
9
- show:
10
- show_all:
11
- this_section_visually_hidden:
7
+ hide: 隐藏
8
+ hide_all: 隐藏所有小节
9
+ show: 显示
10
+ show_all: 显示所有小节
11
+ this_section_visually_hidden: " 本小节"
12
12
  article_schema:
13
- scoped_search_description:
13
+ scoped_search_description: 在 %{title} 内搜索
14
14
  attachment:
15
- opendocument_html:
16
- order_a_copy:
15
+ opendocument_html: 本文件是 <a href='https://www.gov.uk/guidance/using-open-document-formats-odf-in-your-organisation' target=%{target} class='govuk-link'>开放式文本</a> 格式
16
+ order_a_copy: 订购副本
17
17
  page:
18
- one:
19
- other:
20
- reference:
21
- request_format_cta:
22
- request_format_details_html:
23
- request_format_text:
18
+ one: 1页
19
+ other: "%{count} 页"
20
+ reference: 参考号:%{reference}
21
+ request_format_cta: 申请可访问格式。
22
+ request_format_details_html: '如果您使用辅助技术(如屏幕阅读器),并需要更易于访问的格式,请发送电子邮件 <a href=''mailto:%{alternative_format_contact_email}'' target=''_blank'' class=''govuk-link''>%{alternative_format_contact_email}</a>。请告诉我们您需要什么格式。如果您能说出自己使用的辅助技术,这对我们很有帮助。 '
23
+ request_format_text: 此文件可能不适合辅助技术用户使用。
24
24
  back_link:
25
- back:
25
+ back: 向后
26
26
  character_count:
27
- body:
27
+ body: 您最多可以输入 %{number} 个 %{type}
28
28
  type:
29
- characters:
30
- words:
29
+ characters: 字符
30
+ words: 单词
31
31
  checkboxes:
32
- or:
32
+ or:
33
33
  contents_list:
34
- contents:
34
+ contents: 目录
35
35
  contextual_sidebar:
36
- pretitle:
36
+ pretitle: 也是部分
37
37
  cookie_banner:
38
38
  buttons:
39
- accept_cookies:
40
- reject_cookies:
41
- confirmation_message:
42
- confirmation_message_link:
43
- hide:
39
+ accept_cookies: 接受额外cookies
40
+ reject_cookies: 拒绝额外cookies
41
+ confirmation_message_html: 您可以随时 %{link}。
42
+ confirmation_message_link: 更改您的cookie设置
43
+ hide: 隐藏此消息
44
44
  text:
45
- title:
45
+ - 我们使用一些基本的cookie以使本网站运作。
46
+ - 我们希望设置额外的cookie,以了解您如何使用GOV.UK,记住您的设置,并改善政府服务。
47
+ - 我们也使用其他网站设置的cookie,以帮助我们提供其服务的内容。
48
+ title: GOV.UK上的Cookies
46
49
  devolved_nations:
47
50
  applies_to:
48
51
  connectors:
@@ -51,69 +54,59 @@ zh:
51
54
  england:
52
55
  northern_ireland:
53
56
  scotland:
57
+ type:
58
+ consultation:
59
+ detailed_guide:
60
+ guidance:
61
+ publication:
54
62
  wales:
55
63
  feedback:
56
- close:
57
- dont_include_personal_info:
58
- email_address:
59
- help_us_improve_govuk:
60
- is_not_useful:
61
- is_this_page_useful:
62
- is_useful:
63
- maybe:
64
- more_about_visit:
65
- 'no':
66
- send:
67
- send_me_survey:
68
- something_wrong:
69
- thank_you_for_feedback:
70
- what_doing:
71
- what_wrong:
72
- 'yes':
64
+ close: 关闭
65
+ dont_include_personal_info: 不要包含个人或财务信息,比如您的国家保险号或信用卡信息。
66
+ email_address: 电子邮箱地址
67
+ help_us_improve_govuk: 帮助我们改善GOV.UK
68
+ is_not_useful: 这个页面没有用
69
+ is_this_page_useful: 这个页面有用吗?
70
+ is_useful: 这个页面很有用
71
+ maybe: 可能
72
+ more_about_visit: 为了帮助我们改进GOV.UK,我们想了解更多关于您今天访问的信息。我们会给您发一个反馈表格的链接。只需2分钟即可填完。别担心,我们不会给您发垃圾邮件或将您的电子邮件地址分享给任何人。
73
+ 'no':
74
+ send: 发送
75
+ send_me_survey: 将调查表发给我
76
+ something_wrong: 报告此页面的问题
77
+ thank_you_for_feedback: 非常感谢您的反馈
78
+ what_doing: 您在干什么?
79
+ what_wrong: 发生了哪些错误?
80
+ 'yes':
73
81
  government_navigation:
74
- consultations:
75
- departments:
76
- get-involved:
77
- how-government-works:
78
- news_and_communications:
79
- statistics:
80
- worldwide:
81
- intervention:
82
- description:
83
- dismiss_link_text:
84
- dismiss_post_link:
85
- title:
82
+ consultations: 咨询
83
+ departments: 部门
84
+ get-involved: 参与
85
+ how-government-works: 政府如何运营
86
+ news_and_communications: 新闻和通讯
87
+ statistics: 统计数据
88
+ worldwide: 全世界
86
89
  layout_footer:
87
- copyright_html:
88
- licence_html:
89
- support_links:
90
+ copyright_html: <a class="govuk-footer__link govuk-footer__copyright-logo" href="http://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/">© Crown版权所有</a>
91
+ licence_html: 除另有说明外,所有内容均可在 <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">开放政府许可证第3.0版</a>获取
92
+ support_links: 支持链接
90
93
  layout_for_public:
91
94
  account_layout:
92
95
  feedback:
93
96
  banners:
94
- footer_intro:
95
- footer_link:
96
- footer_outro:
97
- phase_intro:
98
- phase_link:
99
- phase_outro:
100
- title:
97
+ phase_banner_html:
101
98
  navigation:
102
- destroy_user_session:
103
99
  menu_bar:
104
100
  account:
105
101
  link_text:
106
102
  manage:
107
103
  link_text:
108
- security:
109
- link_text:
110
- user_root_path:
111
104
  layout_header:
112
- hide_button:
113
- menu:
114
- search_button:
115
- show_button:
116
- top_level:
105
+ hide_button: 隐藏搜索
106
+ menu: 菜单
107
+ search_button: 搜索GOV.UK
108
+ show_button: 显示搜索
109
+ top_level: 最高级
117
110
  layout_super_navigation_header:
118
111
  logo_link_title:
119
112
  logo_text:
@@ -128,77 +121,83 @@ zh:
128
121
  popular_links_heading:
129
122
  search_text:
130
123
  metadata:
131
- from:
132
- history:
133
- last_updated:
134
- part_of:
135
- published:
136
- see_all_updates:
137
- toggle_less:
138
- toggle_more:
124
+ from:
125
+ history: 历史
126
+ last_updated: 上次更新
127
+ part_of: 一部分
128
+ published: 已发布
129
+ see_all_updates: 查看全部更新
130
+ toggle_less: 显示更少
131
+ toggle_more: "+ %{number}更多"
139
132
  modal_dialogue:
140
- close_modal:
133
+ close_modal: 关闭模态对话
141
134
  notice:
142
135
  banner_title:
143
136
  organisation_schema:
144
- all_content_search_description:
137
+ all_content_search_description: 查找 %{organisation} 的全部内容
145
138
  previous_and_next_navigation:
146
- pagination:
139
+ pagination: 分页
147
140
  print_link:
148
- text:
141
+ text: 打印本页面
149
142
  radio:
150
- or:
143
+ or:
151
144
  related_footer_navigation:
152
- collections:
153
- policies:
154
- statistical_data_sets:
155
- topical_events:
145
+ collections: 待整理
146
+ policies: 策略
147
+ statistical_data_sets: 统计数据集
148
+ topical_events: 局部事件
156
149
  related_navigation:
157
- collections:
158
- external_links:
159
- policies:
160
- publishers:
161
- related_contacts:
162
- related_content:
163
- related_external_links:
164
- related_guides:
165
- statistical_data_sets:
166
- topical_events:
167
- topics:
150
+ collections: 待整理
151
+ external_links: 网页上的其它地方
152
+ policies: 策略
153
+ publishers: 发布者
154
+ related_contacts: 其他联系人
155
+ related_content: 相关内容
156
+ related_external_links: 网页上的其它地方
157
+ related_guides: 详细指南
158
+ statistical_data_sets: 统计数据集
159
+ topical_events: 局部事件
160
+ topics: 探索本主题
168
161
  transition:
169
- link_path:
170
- link_text:
171
- title:
172
- world_locations:
162
+ hub_page_link_path: "/transition-check/questions"
163
+ hub_page_link_text: 获得个性化的操作列表
164
+ hub_page_title: 英国脱欧检查程序
165
+ link_path: "/brexit"
166
+ link_text: 检查您需要做的事情
167
+ title: 英国脱欧
168
+ world_locations: 世界地点
173
169
  search_box:
174
- input_title:
175
- label:
176
- search_button:
170
+ input_title: 搜索
171
+ label: 搜索GOV.UK
172
+ search_button: 搜索
177
173
  show_password:
178
- announce_hide:
179
- announce_show:
180
- hide:
181
- hide_password:
182
- show:
183
- show_password:
174
+ announce_hide: 您的密码已隐藏
175
+ announce_show: 您的密码已显示
176
+ hide: 隐藏
177
+ hide_password: 隐藏密码
178
+ show: 显示
179
+ show_password: 显示密码
180
+ single_page_notification_button:
181
+ subscribe_text:
182
+ unsubscribe_text:
184
183
  skip_link:
185
- text:
184
+ text: 跳过主要内容
186
185
  step_by_step_nav:
187
- hide:
188
- hide_all:
189
- show:
190
- show_all:
186
+ hide: 隐藏
187
+ hide_all: 隐藏全部步骤
188
+ show: 显示
189
+ show_all: 显示全部步骤
191
190
  step_by_step_nav_related:
192
- part_of:
191
+ part_of: 一部分
193
192
  subscription_links:
194
- email_signup_link_text:
195
- feed_link_label:
196
- feed_link_text:
197
- subscriptions:
193
+ email_signup_link_text: 获取电子邮件
194
+ feed_link_label: 将此URL复制并粘贴到推送阅读器
195
+ feed_link_text: 订阅推送
196
+ subscriptions: 订阅
198
197
  success_alert:
199
- success:
198
+ success: 成功
200
199
  summary_list:
201
- delete:
202
- edit:
200
+ delete: 删除
201
+ edit: 更改
203
202
  tabs:
204
- contents:
203
+ contents: 目录
@@ -108,146 +108,22 @@ module GovukPublishingComponents
108
108
  false
109
109
  end
110
110
 
111
- def show_brexit_related_links?
112
- # If tagged directly to /brexit or /world/brexit
113
- # Or if tagged to a taxon which has /brexit as a parent
114
- # And is not the brexit hub pages
115
- return false if brexit_hub_pages.include?(content_item["content_id"])
116
-
117
- tagged_to_brexit?
118
- end
119
-
120
- def brexit_cta_document_exceptions
121
- # /government/news/30-creative-teams-awarded-up-to-100000-each-for-festival-uk-2022-rd-project
122
- # and answer pages that have a start button (tracked in https://docs.google.com/spreadsheets/d/1ynH8zIjvElvK-u8JLI8KOYylxTbzJsoXRqEnqrnqv_4/edit)
123
- %w[
124
- c3752802-f091-43a9-ba90-33568fccf391
125
- e1a9ce2b-4085-4761-b70f-d125a6571de3
126
- 6a2bf66e-2313-4204-afd5-9940de5e1d66
127
- f65b0ac7-b8cd-476b-bd5d-738268517659
128
- 45ad868a-2e79-4029-991b-c29559d7eb29
129
- e4e9c4ec-385e-4758-93ac-388bc154815e
130
- cee73f76-83f0-44e2-b657-3b51a9cbc76e
131
- 9a945506-60bc-44d8-a2ec-0eb2824732d6
132
- 6ae16c12-a554-44e2-b3e3-596375aa1b9a
133
- 9add4ccc-dc4c-44cf-9b69-6878c162d431
134
- 4f5cf1cd-efda-4c49-8292-1db1c6c3cfb0
135
- 73058592-dedf-4379-9a1d-d8222a796c0a
136
- c9259172-5432-43a6-b710-409d463c7627
137
- 59ecfc6d-cb9e-49b8-b013-fc368ebdf8ed
138
- 9897695d-624b-4cb9-b873-f3113f0332a1
139
- 715f4659-b058-46ec-84c8-cc346c210778
140
- c63890f9-2356-4be3-9e07-6cf4b8de7081
141
- e7661ec8-b678-444e-b4d0-a221fa83a7f7
142
- 723f9c0a-bcdb-4d8f-952c-6df0ed468c57
143
- a1c420b7-11d7-4b9c-a97e-406fb73c0200
144
- c1347936-839b-4547-a570-0c315c34ee45
145
- 1396f68b-6ffa-47ef-a049-414e7b548e81
146
- 3b054acf-d0af-470e-b912-9481204d1a9a
147
- 317b9c08-928b-4fd2-bc8e-4c6acf287c58
148
- 44d6cb7a-d853-4cd8-a9cb-69eff0299d9e
149
- 15517245-f142-4e45-ad84-773250f7d5a2
150
- 6fe6644d-d037-4ea4-baf6-800dc1966ed0
151
- 4a63625c-a195-4b86-9562-cb6653dd26ff
152
- 47521233-20a8-4d02-ba31-6e1977448fd1
153
- 7b8ca4ac-f3a3-41b8-9555-9e244c36575b
154
- be1a82d1-e53c-431a-9e7a-337ed4b2654f
155
- 6c445001-4e29-4853-8c14-444d7f9374ee
156
- c8cf2a7c-5c13-4f3d-b1ff-6a7eb5533973
157
- 2422a237-f8f1-4e9f-ad51-f1d44fde9755
158
- ae000c08-c74f-467b-b8a4-90f138252a5c
159
- 7eec7800-9c4d-4160-af53-57b5d3e02972
160
- eb545b3b-111b-4c3c-890c-c9ec29b9090d
161
- 8d705ade-8977-480d-9080-72a19e341c2a
162
- 2a0dd317-0252-4c7c-8c13-b43af28406bc
163
- f27e5792-a84b-4164-9890-7e86767634e8
164
- b0b9a600-1fe6-4257-9e68-2be0f59ea25d
165
- 28fa04ea-42e1-46ad-9abc-acf132c5666d
166
- 64b27b8a-ae53-4034-a812-f4805cd7e3ad
167
- 1dd5a75f-18b4-419d-b2b6-6d4808f2c7e4
168
- b21b9e34-455c-4305-b4cc-4e6b8d3f7522
169
- 0ab53a0d-b098-43a8-b3cc-8b3224697228
170
- e3862156-ba5a-41ba-8ee6-22e5cd6a6144
171
- 2e8f7fae-7164-459c-898b-0c0538eee3e0
172
- 6087439c-26d2-4881-b345-5160e23f3b5e
173
- cac78a0a-9c28-436a-a29e-8ccbe8fbc956
174
- c2fd13a5-537b-4368-ac2e-6078b2c463f1
175
- 98f0a21d-7b67-4089-a98c-f0a0177291a2
176
- 06692612-8c39-464c-8aee-2aa62e6c8887
177
- df943977-69cb-479d-a921-9410d603c471
178
- 2656eb6b-f2eb-4982-8a90-e40d03a34a4d
179
- 4ca8698b-4a24-45ff-baea-7633cc24b679
180
- ed73581f-9bf8-48b5-bb66-935581a255e3
181
- 15f1c594-af1d-4f16-97cc-ad4d12017509
182
- ] + brexit_hub_pages
183
- end
184
-
185
- # we don't want to show the standard Brexit sidebar nav on
186
- # https://www.gov.uk/guidance/brexit-guidance-for-individuals-and-families or
187
- # https://www.gov.uk/guidance/brexit-guidance-for-businesses
188
- # as it might result in circular journeys
189
- def brexit_hub_pages
190
- %w[
191
- 91cd6143-69d5-4f27-99ff-a52fb0d51c78
192
- 6555e0bf-c270-4cf9-a0c5-d20b95fab7f1
193
- ]
194
- end
195
-
196
- def brexit_cta_document_exception?
197
- brexit_cta_document_exceptions.include?(content_item["content_id"])
198
- end
199
-
200
- def brexit_cta_document_type_exceptions
201
- %w[
202
- aaib_report
203
- asylum_support_decision
204
- fatality_notice
205
- maib_report
206
- raib_report
207
- simple_smart_answer
208
- smart_answer
209
- transaction
210
- ]
211
- end
212
-
213
- def brexit_cta_document_type_exception?
214
- brexit_cta_document_type_exceptions.include?(content_item["document_type"])
215
- end
216
-
217
111
  def brexit_cta_taxon_allow_list
218
- # Entering and staying in the UK
219
- # Going and being abroad
220
- # Corporate information
221
- # Transport
222
- # Environment
223
- # International
224
- # Defence and armed forces
225
- # Work
226
- # Welfare
227
- # Money
228
- # Business and industry
229
- # Health and social care
230
- # Education > Further and higher education
231
- # Education > Teaching and leadership
232
- # Education > Funding and finance for students
233
- # Coronavirus (COVID-19)
112
+ # Overseas businesses: exporting to the UK
113
+ # Exporting goods and services
114
+ # Exporting
115
+ # Manufacturing, wholesaling, importing and exporting medicines
116
+ # Importing goods and services
117
+ # Importing
118
+ # Manufacturing, wholesaling, importing and exporting medicines
234
119
  %w[
235
- ba3a9702-da22-487f-86c1-8334a730e559
236
- 9597c30a-605a-4e36-8bc1-47e5cdae41b3
237
- a544d48b-1e9e-47fb-b427-7a987c658c14
238
- a4038b29-b332-4f13-98b1-1c9709e216bc
239
- 3cf97f69-84de-41ae-bc7b-7e2cc238fa58
240
- 37d0fa26-abed-4c74-8835-b3b51ae1c8b2
241
- e491505c-77ae-45b2-84be-8c94b94f6a2b
242
- d0f1e5a3-c8f4-4780-8678-994f19104b21
243
- dded88e2-f92e-424f-b73e-6ad24a839c51
244
- 6acc9db4-780e-4a46-92b4-1812e3c2c48a
245
- 495afdb6-47be-4df1-8b38-91c8adb1eefc
246
- 8124ead8-8ebc-4faf-88ad-dd5cbcc92ba8
247
- dd767840-363e-43ad-8835-c9ab516633de
248
- ff00b8b2-dcdb-4659-93c2-291c9be354f3
249
- 23265b25-7ec3-4960-8517-4ff8d4d92cac
250
- 5b7b9532-a775-4bd2-a3aa-6ce380184b6c
120
+ 2f8b848d-23c8-4f42-a41a-df1f81c64d0f
121
+ 8af13fba-d969-4d87-a02e-2e71783d47be
122
+ efa9782b-a3d0-4ca0-9c92-3b89748175b7
123
+ f441e630-2bba-4bbd-8c1b-22ae61cc00c2
124
+ 4788b4b8-2642-47ca-bfc2-bd7e8705a1da
125
+ d74faafc-781d-4087-8e0c-be4216180059
126
+ f441e630-2bba-4bbd-8c1b-22ae61cc00c2
251
127
  ]
252
128
  end
253
129
 
@@ -261,10 +137,6 @@ module GovukPublishingComponents
261
137
  false
262
138
  end
263
139
 
264
- def brexit_cta_lang_allow_list?
265
- %w[en cy].include?(content_item["locale"])
266
- end
267
-
268
140
  def parent_taxon_include?(taxon, taxon_list)
269
141
  if taxon.present?
270
142
  if taxon.dig("links", "parent_taxons").to_a.any? { |taxon_item| taxon_list.include?(taxon_item["content_id"]) }
@@ -277,46 +149,46 @@ module GovukPublishingComponents
277
149
  end
278
150
  end
279
151
 
280
- def brexit_cta_taxon_exception_list
281
- # Entering and staying in the UK > Immigration offences
282
- # Entering and staying in the UK > Inspections of border, immigration and asylum services
283
- # Entering and staying in the UK > Refugees, asylum and human rights
284
- # Transport > Local transport
285
- # Education > Further and higher education > Education in prisons
152
+ def show_brexit_cta?
153
+ brexit_cta_taxon_allow_list?
154
+ end
155
+
156
+ def show_covid_booster_cta?
157
+ !covid_booster_cta_document_type_exempt? &&
158
+ !covid_booster_cta_taxon_exception_list?
159
+ end
160
+
161
+ def covid_booster_cta_document_type_exempt?
162
+ covid_booster_cta_document_type_exceptions.include?(content_item["document_type"])
163
+ end
164
+
165
+ def covid_booster_cta_document_type_exceptions
286
166
  %w[
287
- fa13521f-9285-45b0-bd65-4a472a8037e7
288
- 0fab9131-f877-4286-b4d8-922fbfb402b6
289
- 08a8a69f-2825-4fe2-a4cf-c83458a5629e
290
- 3b4d6319-fcef-4637-b35a-e3df76321894
291
- 6426d1c5-93c8-4659-85d5-1f0d3368a124
167
+ simple_smart_answer
168
+ smart_answer
169
+ step_by_step_nav
292
170
  ]
293
171
  end
294
172
 
295
- def brexit_cta_taxon_exception_list?
173
+ def covid_booster_cta_taxon_exception_list?
296
174
  taxons = content_item.dig("links", "taxons").to_a
297
175
  taxons.each do |taxon|
298
- if brexit_cta_taxon_exception_list.include?(taxon["content_id"]) || parent_taxon_include?(taxon, brexit_cta_taxon_exception_list)
176
+ if covid_booster_cta_taxon_exception_list.include?(taxon["content_id"]) || parent_taxon_include?(taxon, covid_booster_cta_taxon_exception_list)
299
177
  return true
300
178
  end
301
179
  end
302
180
  false
303
181
  end
304
182
 
305
- def brexit_cta_exception?
306
- brexit_cta_document_exception? ||
307
- brexit_cta_document_type_exception? ||
308
- brexit_cta_taxon_exception_list?
309
- end
310
-
311
- def show_brexit_cta?
312
- brexit_cta_taxon_allow_list? &&
313
- brexit_cta_lang_allow_list? &&
314
- step_by_step_count.zero? &&
315
- !brexit_cta_exception?
316
- end
317
-
318
- def step_by_step_count
319
- step_nav_helper.step_navs.count
183
+ def covid_booster_cta_taxon_exception_list
184
+ # Welfare > Death and benefits
185
+ # Life circumstances > Death and bereavement
186
+ # Life circumstances > Death registration disclosure
187
+ %w[
188
+ ac7b8472-5d09-4679-9551-87847b0ac827
189
+ 0fffa994-b76d-4539-8bf9-2a6c6751580d
190
+ de978199-11e8-49b9-965e-4fa6a7ae79a8
191
+ ]
320
192
  end
321
193
 
322
194
  def content_tagged_to_current_step_by_step?
@@ -13,6 +13,9 @@ module GovukPublishingComponents
13
13
  @image_src = local_assigns[:image_src]
14
14
  @image_alt = local_assigns[:image_alt] || ""
15
15
  @image_loading = local_assigns[:image_loading] || "auto"
16
+ @srcset = local_assigns[:srcset] || nil
17
+ @sizes = local_assigns[:sizes] || nil
18
+ @image_loading = local_assigns[:image_loading] || "auto"
16
19
  @context = local_assigns[:context]
17
20
  @description = local_assigns[:description]
18
21
  @large = local_assigns[:large]
@@ -36,7 +39,14 @@ module GovukPublishingComponents
36
39
  def image
37
40
  if @image_src
38
41
  content_tag(:figure, class: "gem-c-image-card__image-wrapper") do
39
- image_tag(@image_src, class: "gem-c-image-card__image", alt: @image_alt, loading: @image_loading)
42
+ image_tag(
43
+ @image_src,
44
+ class: "gem-c-image-card__image",
45
+ alt: @image_alt,
46
+ loading: @image_loading,
47
+ sizes: @sizes,
48
+ srcset: @srcset,
49
+ )
40
50
  end
41
51
  end
42
52
  end
@@ -1,7 +1,7 @@
1
1
  module GovukPublishingComponents
2
2
  module Presenters
3
3
  class SinglePageNotificationButtonHelper
4
- attr_reader :already_subscribed, :data_attributes, :base_path, :js_enhancement, :button_type, :button_location
4
+ attr_reader :already_subscribed, :data_attributes, :base_path, :js_enhancement, :button_type, :button_location, :classes
5
5
 
6
6
  def initialize(local_assigns)
7
7
  @local_assigns = local_assigns
@@ -11,6 +11,8 @@ module GovukPublishingComponents
11
11
  @base_path = @local_assigns[:base_path] || nil
12
12
  @button_location = button_location_is_valid? ? @local_assigns[:button_location] : nil
13
13
  @button_type = @local_assigns[:already_subscribed] ? "Unsubscribe" : "Subscribe"
14
+ @classes = %w[gem-c-single-page-notification-button]
15
+ @classes << "js-personalisation-enhancement" if js_enhancement
14
16
  end
15
17
 
16
18
  def data
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "27.16.0".freeze
2
+ VERSION = "27.20.0".freeze
3
3
  end