govuk_publishing_components 29.4.0 → 29.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/govuk_publishing_components/lib/govspeak/magna-charta.js +20 -6
  3. data/app/assets/stylesheets/component_guide/application.scss +1 -1
  4. data/app/assets/stylesheets/govuk_publishing_components/components/_checkboxes.scss +2 -2
  5. data/app/assets/stylesheets/govuk_publishing_components/components/_contextual-sidebar.scss +1 -1
  6. data/app/assets/stylesheets/govuk_publishing_components/components/_layout-super-navigation-header.scss +2 -2
  7. data/app/assets/stylesheets/govuk_publishing_components/components/_modal-dialogue.scss +1 -1
  8. data/app/assets/stylesheets/govuk_publishing_components/components/_organisation-logo.scss +2 -2
  9. data/app/assets/stylesheets/govuk_publishing_components/components/_reorderable-list.scss +2 -2
  10. data/app/assets/stylesheets/govuk_publishing_components/components/_search.scss +2 -2
  11. data/app/assets/stylesheets/govuk_publishing_components/components/_step-by-step-nav.scss +1 -1
  12. data/app/assets/stylesheets/govuk_publishing_components/components/_summary-list.scss +1 -1
  13. data/app/assets/stylesheets/govuk_publishing_components/components/govspeak/_typography.scss +1 -1
  14. data/app/assets/stylesheets/govuk_publishing_components/govuk_frontend_support.scss +3 -3
  15. data/app/controllers/govuk_publishing_components/audit_controller.rb +1 -4
  16. data/app/models/govuk_publishing_components/audit_components.rb +61 -24
  17. data/app/views/govuk_publishing_components/audit/_applications.html.erb +8 -3
  18. data/app/views/govuk_publishing_components/audit/_component_contents.html.erb +82 -0
  19. data/app/views/govuk_publishing_components/audit/_components.html.erb +2 -47
  20. data/app/views/govuk_publishing_components/components/_attachment.html.erb +1 -1
  21. data/app/views/govuk_publishing_components/components/_attachment_link.html.erb +1 -1
  22. data/config/locales/ar.yml +1 -0
  23. data/config/locales/az.yml +1 -0
  24. data/config/locales/be.yml +1 -0
  25. data/config/locales/bg.yml +1 -0
  26. data/config/locales/bn.yml +1 -0
  27. data/config/locales/cs.yml +1 -0
  28. data/config/locales/cy.yml +1 -0
  29. data/config/locales/da.yml +1 -0
  30. data/config/locales/de.yml +1 -0
  31. data/config/locales/dr.yml +1 -0
  32. data/config/locales/el.yml +1 -0
  33. data/config/locales/en.yml +54 -3
  34. data/config/locales/es-419.yml +1 -0
  35. data/config/locales/es.yml +1 -0
  36. data/config/locales/et.yml +1 -0
  37. data/config/locales/fa.yml +1 -0
  38. data/config/locales/fi.yml +1 -0
  39. data/config/locales/fr.yml +1 -0
  40. data/config/locales/gd.yml +1 -0
  41. data/config/locales/gu.yml +1 -0
  42. data/config/locales/he.yml +1 -0
  43. data/config/locales/hi.yml +1 -0
  44. data/config/locales/hr.yml +1 -0
  45. data/config/locales/hu.yml +1 -0
  46. data/config/locales/hy.yml +1 -0
  47. data/config/locales/id.yml +1 -0
  48. data/config/locales/is.yml +1 -0
  49. data/config/locales/it.yml +1 -0
  50. data/config/locales/ja.yml +1 -0
  51. data/config/locales/ka.yml +1 -0
  52. data/config/locales/kk.yml +1 -0
  53. data/config/locales/ko.yml +1 -0
  54. data/config/locales/lt.yml +1 -0
  55. data/config/locales/lv.yml +1 -0
  56. data/config/locales/ms.yml +1 -0
  57. data/config/locales/mt.yml +1 -0
  58. data/config/locales/nl.yml +1 -0
  59. data/config/locales/no.yml +1 -0
  60. data/config/locales/pa-pk.yml +1 -0
  61. data/config/locales/pa.yml +1 -0
  62. data/config/locales/pl.yml +1 -0
  63. data/config/locales/ps.yml +1 -0
  64. data/config/locales/pt.yml +1 -0
  65. data/config/locales/ro.yml +1 -0
  66. data/config/locales/ru.yml +1 -0
  67. data/config/locales/si.yml +1 -0
  68. data/config/locales/sk.yml +1 -0
  69. data/config/locales/sl.yml +1 -0
  70. data/config/locales/so.yml +1 -0
  71. data/config/locales/sq.yml +1 -0
  72. data/config/locales/sr.yml +1 -0
  73. data/config/locales/sv.yml +1 -0
  74. data/config/locales/sw.yml +1 -0
  75. data/config/locales/ta.yml +1 -0
  76. data/config/locales/th.yml +1 -0
  77. data/config/locales/tk.yml +1 -0
  78. data/config/locales/tr.yml +1 -0
  79. data/config/locales/uk.yml +1 -0
  80. data/config/locales/ur.yml +1 -0
  81. data/config/locales/uz.yml +1 -0
  82. data/config/locales/vi.yml +1 -0
  83. data/config/locales/zh-hk.yml +1 -0
  84. data/config/locales/zh-tw.yml +1 -0
  85. data/config/locales/zh.yml +1 -0
  86. data/lib/govuk_publishing_components/presenters/{attachment.rb → attachment_helper.rb} +6 -3
  87. data/lib/govuk_publishing_components/presenters/public_layout_helper.rb +18 -289
  88. data/lib/govuk_publishing_components/version.rb +1 -1
  89. data/lib/govuk_publishing_components.rb +1 -1
  90. metadata +5 -4
@@ -83,6 +83,7 @@ vi:
83
83
  layout_footer:
84
84
  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/">© Bản quyền Crown</a>
85
85
  licence_html: Tất cả nội dung đều có sẵn theo <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Giấy phép Chính phủ Mở pb3.0</a>, trừ khi có quy định khác
86
+ navigation_links:
86
87
  support_links: Liên kết hỗ trợ
87
88
  layout_for_public:
88
89
  account_layout:
@@ -82,6 +82,7 @@ zh-hk:
82
82
  layout_footer:
83
83
  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>
84
84
  licence_html: 除另有說明者外,所有內容均可在 <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">Open Government Licence v3.0</a>獲取。
85
+ navigation_links:
85
86
  support_links: 支援連結
86
87
  layout_for_public:
87
88
  account_layout:
@@ -82,6 +82,7 @@ zh-tw:
82
82
  layout_footer:
83
83
  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 copyright</a>
84
84
  licence_html: 所有內容都具 <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">英國政府開放授權v3.0</a>,除非另有說明
85
+ navigation_links:
85
86
  support_links: 補充連結
86
87
  layout_for_public:
87
88
  account_layout:
@@ -82,6 +82,7 @@ zh:
82
82
  layout_footer:
83
83
  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>
84
84
  licence_html: 除另有说明外,所有内容均可在 <a class="govuk-footer__link" href="https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/" rel="license">开放政府许可证第3.0版</a>获取
85
+ navigation_links:
85
86
  support_links: 支持链接
86
87
  layout_for_public:
87
88
  account_layout:
@@ -1,11 +1,14 @@
1
1
  module GovukPublishingComponents
2
2
  module Presenters
3
- class Attachment
3
+ class AttachmentHelper
4
4
  # Various departments are taking part in a pilot to use a form
5
5
  # rather than direct email for users to request accessible formats. When the pilot
6
6
  # scheme is rolled out further this can be removed.
7
- # Currently the HMRC are participating in the pilot.
8
- EMAILS_IN_ACCESSIBLE_FORMAT_REQUEST_PILOT = %w[govuk_publishing_components@example.com].freeze
7
+ # Currently DfE, DWP and DVSA are participating in the pilot.
8
+ EMAILS_IN_ACCESSIBLE_FORMAT_REQUEST_PILOT = %w[govuk_publishing_components@example.com
9
+ alternative.formats@education.gov.uk
10
+ accessible.formats@dwp.gov.uk
11
+ gov.uk.publishing@dvsa.gov.uk].freeze
9
12
 
10
13
  delegate :opendocument?, :document?, :spreadsheet?, to: :content_type
11
14
 
@@ -1,294 +1,7 @@
1
1
  module GovukPublishingComponents
2
2
  module Presenters
3
3
  class PublicLayoutHelper
4
- FOOTER_NAV = [
5
- {
6
- title: "Services and information",
7
- columns: 2,
8
- items: [
9
- {
10
- href: "/browse/benefits",
11
- text: "Benefits",
12
- attributes: {
13
- data: {
14
- track_category: "footerClicked",
15
- track_action: "footerLinks",
16
- track_label: "Benefits",
17
- },
18
- },
19
- },
20
- {
21
- href: "/browse/births-deaths-marriages",
22
- text: "Births, deaths, marriages and care",
23
- attributes: {
24
- data: {
25
- track_category: "footerClicked",
26
- track_action: "footerLinks",
27
- track_label: "Births, deaths, marriages and care",
28
- },
29
- },
30
- },
31
- {
32
- href: "/browse/business",
33
- text: "Business and self-employed",
34
- attributes: {
35
- data: {
36
- track_category: "footerClicked",
37
- track_action: "footerLinks",
38
- track_label: "Business and self-employed",
39
- },
40
- },
41
- },
42
- {
43
- href: "/browse/childcare-parenting",
44
- text: "Childcare and parenting",
45
- attributes: {
46
- data: {
47
- track_category: "footerClicked",
48
- track_action: "footerLinks",
49
- track_label: "Childcare and parenting",
50
- },
51
- },
52
- },
53
- {
54
- href: "/browse/citizenship",
55
- text: "Citizenship and living in the UK",
56
- attributes: {
57
- data: {
58
- track_category: "footerClicked",
59
- track_action: "footerLinks",
60
- track_label: "Citizenship and living in the UK",
61
- },
62
- },
63
- },
64
- {
65
- href: "/browse/justice",
66
- text: "Crime, justice and the law",
67
- attributes: {
68
- data: {
69
- track_category: "footerClicked",
70
- track_action: "footerLinks",
71
- track_label: "Crime, justice and the law",
72
- },
73
- },
74
- },
75
- {
76
- href: "/browse/disabilities",
77
- text: "Disabled people",
78
- attributes: {
79
- data: {
80
- track_category: "footerClicked",
81
- track_action: "footerLinks",
82
- track_label: "Disabled people",
83
- },
84
- },
85
- },
86
- {
87
- href: "/browse/driving",
88
- text: "Driving and transport",
89
- attributes: {
90
- data: {
91
- track_category: "footerClicked",
92
- track_action: "footerLinks",
93
- track_label: "Driving and transport",
94
- },
95
- },
96
- },
97
- {
98
- href: "/browse/education",
99
- text: "Education and learning",
100
- attributes: {
101
- data: {
102
- track_category: "footerClicked",
103
- track_action: "footerLinks",
104
- track_label: "Education and learning",
105
- },
106
- },
107
- },
108
- {
109
- href: "/browse/employing-people",
110
- text: "Employing people",
111
- attributes: {
112
- data: {
113
- track_category: "footerClicked",
114
- track_action: "footerLinks",
115
- track_label: "Employing people",
116
- },
117
- },
118
- },
119
- {
120
- href: "/browse/environment-countryside",
121
- text: "Environment and countryside",
122
- attributes: {
123
- data: {
124
- track_category: "footerClicked",
125
- track_action: "footerLinks",
126
- track_label: "Environment and countryside",
127
- },
128
- },
129
- },
130
- {
131
- href: "/browse/housing-local-services",
132
- text: "Housing and local services",
133
- attributes: {
134
- data: {
135
- track_category: "footerClicked",
136
- track_action: "footerLinks",
137
- track_label: "Housing and local services",
138
- },
139
- },
140
- },
141
- {
142
- href: "/browse/tax",
143
- text: "Money and tax",
144
- attributes: {
145
- data: {
146
- track_category: "footerClicked",
147
- track_action: "footerLinks",
148
- track_label: "Money and tax",
149
- },
150
- },
151
- },
152
- {
153
- href: "/browse/abroad",
154
- text: "Passports, travel and living abroad",
155
- attributes: {
156
- data: {
157
- track_category: "footerClicked",
158
- track_action: "footerLinks",
159
- track_label: "Passports, travel and living abroad",
160
- },
161
- },
162
- },
163
- {
164
- href: "/browse/visas-immigration",
165
- text: "Visas and immigration",
166
- attributes: {
167
- data: {
168
- track_category: "footerClicked",
169
- track_action: "footerLinks",
170
- track_label: "Visas and immigration",
171
- },
172
- },
173
- },
174
- {
175
- href: "/browse/working",
176
- text: "Working, jobs and pensions",
177
- attributes: {
178
- data: {
179
- track_category: "footerClicked",
180
- track_action: "footerLinks",
181
- track_label: "Working, jobs and pensions",
182
- },
183
- },
184
- },
185
- ],
186
- },
187
- {
188
- title: "Departments and policy",
189
- items: [
190
- {
191
- href: "/government/how-government-works",
192
- text: "How government works",
193
- attributes: {
194
- data: {
195
- track_category: "footerClicked",
196
- track_action: "footerLinks",
197
- track_label: "How government works",
198
- },
199
- },
200
- },
201
- {
202
- href: "/government/organisations",
203
- text: "Departments",
204
- attributes: {
205
- data: {
206
- track_category: "footerClicked",
207
- track_action: "footerLinks",
208
- track_label: "Departments",
209
- },
210
- },
211
- },
212
- {
213
- href: "/world",
214
- text: "Worldwide",
215
- attributes: {
216
- data: {
217
- track_category: "footerClicked",
218
- track_action: "footerLinks",
219
- track_label: "Worldwide",
220
- },
221
- },
222
- },
223
- {
224
- href: "/search/services",
225
- text: "Services",
226
- attributes: {
227
- data: {
228
- track_category: "footerClicked",
229
- track_action: "footerLinks",
230
- track_label: "Services",
231
- },
232
- },
233
- },
234
- {
235
- href: "/search/guidance-and-regulation",
236
- text: "Guidance and regulation",
237
- attributes: {
238
- data: {
239
- track_category: "footerClicked",
240
- track_action: "footerLinks",
241
- track_label: "Guidance and regulation",
242
- },
243
- },
244
- },
245
- {
246
- href: "/search/news-and-communications",
247
- text: "News and communications",
248
- attributes: {
249
- data: {
250
- track_category: "footerClicked",
251
- track_action: "footerLinks",
252
- track_label: "News and communications",
253
- },
254
- },
255
- },
256
- {
257
- href: "/search/research-and-statistics",
258
- text: "Research and statistics",
259
- attributes: {
260
- data: {
261
- track_category: "footerClicked",
262
- track_action: "footerLinks",
263
- track_label: "Research and statistics",
264
- },
265
- },
266
- },
267
- {
268
- href: "/search/policy-papers-and-consultations",
269
- text: "Policy papers and consultations",
270
- attributes: {
271
- data: {
272
- track_category: "footerClicked",
273
- track_action: "footerLinks",
274
- track_label: "Policy papers and consultations",
275
- },
276
- },
277
- },
278
- {
279
- href: "/search/transparency-and-freedom-of-information-releases",
280
- text: "Transparency and freedom of information releases",
281
- attributes: {
282
- data: {
283
- track_category: "footerClicked",
284
- track_action: "footerLinks",
285
- track_label: "Transparency and freedom of information releases",
286
- },
287
- },
288
- },
289
- ],
290
- },
291
- ].freeze
4
+ FOOTER_NAVIGATION_COLUMNS = [2, 1].freeze
292
5
 
293
6
  FOOTER_META = {
294
7
  items: [
@@ -333,7 +46,23 @@ module GovukPublishingComponents
333
46
  attr_reader :footer_navigation, :footer_meta, :cookie_banner_data
334
47
 
335
48
  def initialize(local_assigns)
336
- @footer_navigation = local_assigns[:footer_navigation] || FOOTER_NAV
49
+ @footer_navigation = local_assigns[:footer_navigation] || I18n.t("components.layout_footer.navigation_links").each_with_index.map do |menu, i|
50
+ {
51
+ title: menu[:title],
52
+ columns: FOOTER_NAVIGATION_COLUMNS[i],
53
+ items: menu[:menu_contents].map do |item|
54
+ item.merge({
55
+ attributes: {
56
+ data: {
57
+ track_category: "footerClicked",
58
+ track_action: "footerLinks",
59
+ track_label: item[:text],
60
+ },
61
+ },
62
+ })
63
+ end,
64
+ }
65
+ end
337
66
  @footer_meta = local_assigns[:footer_meta] || FOOTER_META
338
67
  @cookie_banner_data = local_assigns[:cookie_banner_data] || {}
339
68
  end
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "29.4.0".freeze
2
+ VERSION = "29.7.0".freeze
3
3
  end
@@ -5,7 +5,7 @@ require "govuk_personalisation"
5
5
  require "govuk_publishing_components/config"
6
6
  require "govuk_publishing_components/engine"
7
7
  require "govuk_publishing_components/presenters/shared_helper"
8
- require "govuk_publishing_components/presenters/attachment"
8
+ require "govuk_publishing_components/presenters/attachment_helper"
9
9
  require "govuk_publishing_components/presenters/big_number_helper"
10
10
  require "govuk_publishing_components/presenters/breadcrumbs"
11
11
  require "govuk_publishing_components/presenters/breadcrumb_selector"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_publishing_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 29.4.0
4
+ version: 29.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-13 00:00:00.000000000 Z
11
+ date: 2022-05-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config
@@ -636,6 +636,7 @@ files:
636
636
  - app/models/govuk_publishing_components/component_example.rb
637
637
  - app/models/govuk_publishing_components/shared_accessibility_criteria.rb
638
638
  - app/views/govuk_publishing_components/audit/_applications.html.erb
639
+ - app/views/govuk_publishing_components/audit/_component_contents.html.erb
639
640
  - app/views/govuk_publishing_components/audit/_components.html.erb
640
641
  - app/views/govuk_publishing_components/audit/show.html.erb
641
642
  - app/views/govuk_publishing_components/component_guide/_application_stylesheet.html.erb
@@ -899,7 +900,7 @@ files:
899
900
  - lib/govuk_publishing_components/config.rb
900
901
  - lib/govuk_publishing_components/engine.rb
901
902
  - lib/govuk_publishing_components/minitest/component_guide_test.rb
902
- - lib/govuk_publishing_components/presenters/attachment.rb
903
+ - lib/govuk_publishing_components/presenters/attachment_helper.rb
903
904
  - lib/govuk_publishing_components/presenters/big_number_helper.rb
904
905
  - lib/govuk_publishing_components/presenters/breadcrumb_selector.rb
905
906
  - lib/govuk_publishing_components/presenters/breadcrumbs.rb
@@ -1890,7 +1891,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1890
1891
  - !ruby/object:Gem::Version
1891
1892
  version: '0'
1892
1893
  requirements: []
1893
- rubygems_version: 3.3.11
1894
+ rubygems_version: 3.3.12
1894
1895
  signing_key:
1895
1896
  specification_version: 4
1896
1897
  summary: A gem to document components in GOV.UK frontend applications