govuk_publishing_components 21.38.3 → 21.38.4

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: b58f173f9f7293159caa22be915eadd3e8d88bd1405ba2128cced392106a7073
4
- data.tar.gz: 2b8f5ad7bc2014f80d873d51e285b17d775835ce60c696da2209476ab6497b49
3
+ metadata.gz: c10f777eb9ab60586ea5271dee6d73fc73d23e5886ca911a6860f73d2771664e
4
+ data.tar.gz: b3432a28b3f6e801197d9c5a51c42d35d98b46f9484ebcb54be6d7f502a741c0
5
5
  SHA512:
6
- metadata.gz: 5f73383f94ce274af84456cb4156acc976900ef1f78721428450afd8c01de2862c8df80f3362b69e4add9a4faa510728aa0eeeb01455c20b95b12a186636e6dc
7
- data.tar.gz: 83e2144af805cb09ad8f96f3a88b9c4fc14b04da4524bc7c5e6270e66953244b0513f890d6a18d22f7949bb65e7063b126e046ac483d8d32653ad983489dae5f
6
+ metadata.gz: d5a8568a50c23be001cc1fde17691424fcebb53eda681cf6162d754989d36703cd47a9d4133e61089b82b5edac54cd5208004c906d628cc8a30bd44e3f19f7d7
7
+ data.tar.gz: 05647ccb2a1fa0a206488a77dec0110aaa5cd42f502215fd920e36d014c98655ca739f662e25306e1e9fea58dedafe0d8e3ac842aa44f8ce0bfb36780b59c48c
@@ -2,6 +2,7 @@
2
2
  attachment = GovukPublishingComponents::Presenters::Attachment.new(attachment)
3
3
  target ||= "_self"
4
4
  hide_opendocument_metadata ||= false
5
+ hide_order_copy_link ||= false
5
6
  attributes = []
6
7
  data_attributes ||= {}
7
8
 
@@ -68,7 +69,7 @@
68
69
  <%= tag.p raw(attributes.join(', ')), class: "gem-c-attachment__metadata" %>
69
70
  <% end %>
70
71
 
71
- <% if attachment.is_official_document %>
72
+ <% if attachment.is_official_document && !hide_order_copy_link %>
72
73
  <%= tag.p link_to("Order a copy", "https://www.gov.uk/guidance/how-to-buy-printed-copies-of-official-documents", class: "govuk-link govuk-link--no-visited-state", target: "_blank"),
73
74
  class: "gem-c-attachment__metadata" %>
74
75
  <% end %>
@@ -143,3 +143,18 @@ examples:
143
143
  isbn: "978-1-913635-01-5"
144
144
  unique_reference: "2942"
145
145
  unnumbered_hoc_paper: true
146
+ hide_order_a_copy:
147
+ description: |
148
+ With 'Order a copy' hidden
149
+ data:
150
+ attachment:
151
+ title: "Budget 2020"
152
+ url: https://assets.publishing.service.gov.uk/government/uploads/system/uploads/attachment_data/file/871799/Budget_2020_Web_Accessible_Complete.pdf
153
+ filename: Budget_2020_Web_Accessible_Complete.pdf
154
+ content_type: application/pdf
155
+ file_size: 20000
156
+ number_of_pages: 12
157
+ isbn: "978-1-913635-01-5"
158
+ unique_reference: "2942"
159
+ unnumbered_hoc_paper: true
160
+ hide_order_copy_link: true
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = "21.38.3".freeze
2
+ VERSION = "21.38.4".freeze
3
3
  end
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.38.3
4
+ version: 21.38.4
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-04-03 00:00:00.000000000 Z
11
+ date: 2020-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gds-api-adapters