govuk_publishing_components 21.29.1 → 21.30.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 339e78a197b69a55dec418f5e5e3b76956c0f88d882368947ee7be8a18efc546
4
- data.tar.gz: cc41372882f3dc3b62f54f2c534b389aa033ad1c262727bc4e17e89441c1a327
3
+ metadata.gz: b3601e8a28c74c025211ae0e7345c46b95992a90f221f3727cc24f39b3b16d05
4
+ data.tar.gz: eab6295e52bf59aa6909d40e5596b26aa32863e67a413cd883eb14a158d39c23
5
5
  SHA512:
6
- metadata.gz: 7290f344c59860baac67f823551a9cdd0c67fbe826ad650abb534a363e7940ea4206c6faf8d7392e202863ed4367756465011e72c857464fae0483f4dbe56ae2
7
- data.tar.gz: 29f20dd035d07a4ba897002fd97469160ec85a47413ac842b035d7587f119bb2bb23749ad3f1c30fab51c5cd36150ccfa53702e7911803f19b5cde37be839fb6
6
+ metadata.gz: 2419f07714f32af0041ee5b9c5672f457eefe80e50faf0e6f77212e39824065f52b9accd27dd7524dc971c06c60bc6baa4ad2287afb296793a388e87bbfb28ea
7
+ data.tar.gz: 402570770b331429bb54e99e73a4529f552f6cb776bd733bbb422766658ae0b6117c074b737fcf23df894fe00f48f621e306790b0e1797390e9b300f45425a79
@@ -66,6 +66,10 @@ $thumbnail-icon-border-colour: govuk-colour("mid-grey", $legacy: "grey-3");
66
66
  }
67
67
  }
68
68
 
69
+ .gem-c-attachment__metadata--compact {
70
+ margin-bottom: 0;
71
+ }
72
+
69
73
  .gem-c-attachment__abbr {
70
74
  text-decoration: none;
71
75
  cursor: help;
@@ -56,10 +56,23 @@
56
56
  data: data_attributes %>
57
57
  <% end %>
58
58
 
59
+ <% if attachment.reference.present? %>
60
+ <%= tag.p "Ref: #{attachment.reference}", class: "gem-c-attachment__metadata gem-c-attachment__metadata--compact" %>
61
+ <% end %>
62
+
63
+ <% if attachment.unnumbered_reference.present? %>
64
+ <%= tag.p attachment.unnumbered_reference, class: "gem-c-attachment__metadata gem-c-attachment__metadata--compact" %>
65
+ <% end %>
66
+
59
67
  <% if attributes.any? %>
60
68
  <%= tag.p raw(attributes.join(', ')), class: "gem-c-attachment__metadata" %>
61
69
  <% end %>
62
70
 
71
+ <% if attachment.is_official_document %>
72
+ <%= tag.p link_to("Order a copy", "https://www.gov.uk/guidance/how-to-buy-printed-copies-of-official-documents", class: "govuk-link", target: "_blank"),
73
+ class: "gem-c-attachment__metadata" %>
74
+ <% end %>
75
+
63
76
  <% unless hide_opendocument_metadata %>
64
77
  <% if attachment.opendocument? %>
65
78
  <%= tag.p class: "gem-c-attachment__metadata" do %>
@@ -86,3 +86,60 @@ examples:
86
86
  file_size: 20000
87
87
  data_attributes:
88
88
  gtm: "attachment-preview"
89
+ command_paper_numbered:
90
+ description: |
91
+ Command paper, numbered
92
+ data:
93
+ attachment:
94
+ title: "The government financial reporting review"
95
+ url: https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/791567/the_government_financial_reporting_review_web.pdf
96
+ filename: department-for-transport-information-asset-register.csv
97
+ content_type: application/pdf
98
+ file_size: 20000
99
+ number_of_pages: 7
100
+ isbn: "978-1-5286-1173-2"
101
+ unique_reference: "2259"
102
+ command_paper_number: "67"
103
+ command_paper_unnumbered:
104
+ description: |
105
+ Command paper, unnumbered
106
+ data:
107
+ attachment:
108
+ title: "The government financial reporting review"
109
+ url: https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/791567/the_government_financial_reporting_review_web.pdf
110
+ filename: the_government_financial_reporting_review_web.pdf
111
+ content_type: application/pdf
112
+ file_size: 20000
113
+ number_of_pages: 7
114
+ isbn: "978-1-5286-1173-2"
115
+ unique_reference: "2259"
116
+ unnumbered_command_paper: true
117
+ act_paper_numbered:
118
+ description: |
119
+ Act paper (House of Commons paper), numbered
120
+ data:
121
+ attachment:
122
+ title: "Budget 2020"
123
+ url: https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/871799/Budget_2020_Web_Accessible_Complete.pdf
124
+ filename: Budget_2020_Web_Accessible_Complete.pdf
125
+ content_type: application/pdf
126
+ file_size: 20000
127
+ number_of_pages: 12
128
+ isbn: "978-1-913635-01-5"
129
+ unique_reference: "2942"
130
+ hoc_paper_number: "121"
131
+ parliamentary_session: "2019-20"
132
+ act_paper_unnumbered:
133
+ description: |
134
+ Act paper (House of Commons paper), unnumbered
135
+ data:
136
+ attachment:
137
+ title: "Budget 2020"
138
+ url: https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/871799/Budget_2020_Web_Accessible_Complete.pdf
139
+ filename: Budget_2020_Web_Accessible_Complete.pdf
140
+ content_type: application/pdf
141
+ file_size: 20000
142
+ number_of_pages: 12
143
+ isbn: "978-1-913635-01-5"
144
+ unique_reference: "2942"
145
+ unnumbered_hoc_paper: true
@@ -47,6 +47,30 @@ module GovukPublishingComponents
47
47
  attachment_data[:alternative_format_contact_email]
48
48
  end
49
49
 
50
+ def reference
51
+ reference = []
52
+ reference << "ISBN #{attachment_data[:isbn]}" if attachment_data[:isbn].present?
53
+ reference << attachment_data[:unique_reference] if attachment_data[:unique_reference].present?
54
+ reference << attachment_data[:command_paper_number] if attachment_data[:command_paper_number].present?
55
+ if attachment_data[:hoc_paper_number].present?
56
+ hoc_reference = "HC #{attachment_data[:hoc_paper_number]}"
57
+ hoc_reference += " #{attachment_data[:parliamentary_session]}" if attachment_data[:parliamentary_session].present?
58
+ reference << hoc_reference
59
+ end
60
+
61
+ reference.join(", ")
62
+ end
63
+
64
+ def unnumbered_reference
65
+ unnumbered_reference = "Unnumbered command paper" if attachment_data[:unnumbered_command_paper].eql?(true) && !attachment_data[:command_paper_number]
66
+ unnumbered_reference = "Unnumbered act paper" if attachment_data[:unnumbered_hoc_paper].eql?(true) && !attachment_data[:hoc_paper_number]
67
+ unnumbered_reference
68
+ end
69
+
70
+ def is_official_document
71
+ attachment_data[:command_paper_number].present? || attachment_data[:hoc_paper_number].present? || attachment_data[:unnumbered_command_paper].eql?(true) || attachment_data[:unnumbered_hoc_paper].eql?(true)
72
+ end
73
+
50
74
  class SupportedContentType
51
75
  attr_reader :content_type_data
52
76
 
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "21.29.1".freeze
2
+ VERSION = "21.30.0".freeze
3
3
  end
@@ -2,18 +2,18 @@
2
2
  "_args": [
3
3
  [
4
4
  {
5
- "raw": "axe-core@^3.5.0",
5
+ "raw": "axe-core@^3.5.2",
6
6
  "scope": null,
7
7
  "escapedName": "axe-core",
8
8
  "name": "axe-core",
9
- "rawSpec": "^3.5.0",
10
- "spec": ">=3.5.0 <4.0.0",
9
+ "rawSpec": "^3.5.2",
10
+ "spec": ">=3.5.2 <4.0.0",
11
11
  "type": "range"
12
12
  },
13
13
  "/var/lib/jenkins/workspace/ublishing_components_master-N4FWJIUY4CIFHKGZOAAEVVXODRY3YBORQOPIBBXWX72VUPSGJRRQ"
14
14
  ]
15
15
  ],
16
- "_from": "axe-core@>=3.5.0 <4.0.0",
16
+ "_from": "axe-core@>=3.5.2 <4.0.0",
17
17
  "_hasShrinkwrap": false,
18
18
  "_id": "axe-core@3.5.2",
19
19
  "_inCache": true,
@@ -30,12 +30,12 @@
30
30
  "_npmVersion": "6.13.4",
31
31
  "_phantomChildren": {},
32
32
  "_requested": {
33
- "raw": "axe-core@^3.5.0",
33
+ "raw": "axe-core@^3.5.2",
34
34
  "scope": null,
35
35
  "escapedName": "axe-core",
36
36
  "name": "axe-core",
37
- "rawSpec": "^3.5.0",
38
- "spec": ">=3.5.0 <4.0.0",
37
+ "rawSpec": "^3.5.2",
38
+ "spec": ">=3.5.2 <4.0.0",
39
39
  "type": "range"
40
40
  },
41
41
  "_requiredBy": [
@@ -44,7 +44,7 @@
44
44
  "_resolved": "https://registry.npmjs.org/axe-core/-/axe-core-3.5.2.tgz",
45
45
  "_shasum": "1946be7a18a05b5d37f18d339989db0d5434ebf6",
46
46
  "_shrinkwrap": null,
47
- "_spec": "axe-core@^3.5.0",
47
+ "_spec": "axe-core@^3.5.2",
48
48
  "_where": "/var/lib/jenkins/workspace/ublishing_components_master-N4FWJIUY4CIFHKGZOAAEVVXODRY3YBORQOPIBBXWX72VUPSGJRRQ",
49
49
  "bugs": {
50
50
  "url": "https://github.com/dequelabs/axe-core/issues"
@@ -2,18 +2,18 @@
2
2
  "_args": [
3
3
  [
4
4
  {
5
- "raw": "govuk-frontend@^3.5.0",
5
+ "raw": "govuk-frontend@^3.6.0",
6
6
  "scope": null,
7
7
  "escapedName": "govuk-frontend",
8
8
  "name": "govuk-frontend",
9
- "rawSpec": "^3.5.0",
10
- "spec": ">=3.5.0 <4.0.0",
9
+ "rawSpec": "^3.6.0",
10
+ "spec": ">=3.6.0 <4.0.0",
11
11
  "type": "range"
12
12
  },
13
13
  "/var/lib/jenkins/workspace/ublishing_components_master-N4FWJIUY4CIFHKGZOAAEVVXODRY3YBORQOPIBBXWX72VUPSGJRRQ"
14
14
  ]
15
15
  ],
16
- "_from": "govuk-frontend@>=3.5.0 <4.0.0",
16
+ "_from": "govuk-frontend@>=3.6.0 <4.0.0",
17
17
  "_hasShrinkwrap": false,
18
18
  "_id": "govuk-frontend@3.6.0",
19
19
  "_inCache": true,
@@ -30,12 +30,12 @@
30
30
  "_npmVersion": "6.12.1",
31
31
  "_phantomChildren": {},
32
32
  "_requested": {
33
- "raw": "govuk-frontend@^3.5.0",
33
+ "raw": "govuk-frontend@^3.6.0",
34
34
  "scope": null,
35
35
  "escapedName": "govuk-frontend",
36
36
  "name": "govuk-frontend",
37
- "rawSpec": "^3.5.0",
38
- "spec": ">=3.5.0 <4.0.0",
37
+ "rawSpec": "^3.6.0",
38
+ "spec": ">=3.6.0 <4.0.0",
39
39
  "type": "range"
40
40
  },
41
41
  "_requiredBy": [
@@ -44,7 +44,7 @@
44
44
  "_resolved": "https://registry.npmjs.org/govuk-frontend/-/govuk-frontend-3.6.0.tgz",
45
45
  "_shasum": "f0d1e6ec3c0eb33616adfdff28ff778fe518d085",
46
46
  "_shrinkwrap": null,
47
- "_spec": "govuk-frontend@^3.5.0",
47
+ "_spec": "govuk-frontend@^3.6.0",
48
48
  "_where": "/var/lib/jenkins/workspace/ublishing_components_master-N4FWJIUY4CIFHKGZOAAEVVXODRY3YBORQOPIBBXWX72VUPSGJRRQ",
49
49
  "author": {
50
50
  "name": "GOV.UK Design System Team",
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: 21.29.1
4
+ version: 21.30.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: 2020-03-12 00:00:00.000000000 Z
11
+ date: 2020-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gds-api-adapters
@@ -182,16 +182,16 @@ dependencies:
182
182
  name: gds-api-adapters
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - "~>"
185
+ - - ">="
186
186
  - !ruby/object:Gem::Version
187
- version: '59.1'
187
+ version: '0'
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - "~>"
192
+ - - ">="
193
193
  - !ruby/object:Gem::Version
194
- version: '59.1'
194
+ version: '0'
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: govuk_schemas
197
197
  requirement: !ruby/object:Gem::Requirement
@@ -226,14 +226,14 @@ dependencies:
226
226
  requirements:
227
227
  - - "~>"
228
228
  - !ruby/object:Gem::Version
229
- version: 3.4.0
229
+ version: 3.5.1
230
230
  type: :development
231
231
  prerelease: false
232
232
  version_requirements: !ruby/object:Gem::Requirement
233
233
  requirements:
234
234
  - - "~>"
235
235
  - !ruby/object:Gem::Version
236
- version: 3.4.0
236
+ version: 3.5.1
237
237
  - !ruby/object:Gem::Dependency
238
238
  name: pry-byebug
239
239
  requirement: !ruby/object:Gem::Requirement
@@ -282,14 +282,14 @@ dependencies:
282
282
  requirements:
283
283
  - - '='
284
284
  - !ruby/object:Gem::Version
285
- version: 3.142.3
285
+ version: 3.142.7
286
286
  type: :development
287
287
  prerelease: false
288
288
  version_requirements: !ruby/object:Gem::Requirement
289
289
  requirements:
290
290
  - - '='
291
291
  - !ruby/object:Gem::Version
292
- version: 3.142.3
292
+ version: 3.142.7
293
293
  - !ruby/object:Gem::Dependency
294
294
  name: uglifier
295
295
  requirement: !ruby/object:Gem::Requirement
@@ -310,14 +310,14 @@ dependencies:
310
310
  requirements:
311
311
  - - "~>"
312
312
  - !ruby/object:Gem::Version
313
- version: 3.6.0
313
+ version: 3.8.3
314
314
  type: :development
315
315
  prerelease: false
316
316
  version_requirements: !ruby/object:Gem::Requirement
317
317
  requirements:
318
318
  - - "~>"
319
319
  - !ruby/object:Gem::Version
320
- version: 3.6.0
320
+ version: 3.8.3
321
321
  - !ruby/object:Gem::Dependency
322
322
  name: yard
323
323
  requirement: !ruby/object:Gem::Requirement