govuk_publishing_components 15.0.0 → 15.1.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: 23c88deb6d387134dbbd3b685859363b74ead59e037184c74a58130e36a2dff1
4
- data.tar.gz: 8defeb9c30b3c1e5f50a39b25e2b4a59c74b119dfcfd88b342cf7c140ea81df2
3
+ metadata.gz: d21f7a40f42fc1c1b961df545b591df2da73baaa33869f76a0acc36055e09230
4
+ data.tar.gz: 37ac7bae8ae7eee35df45b6eaee315725965d3def80720aa6690a3f2e1d6a914
5
5
  SHA512:
6
- metadata.gz: 9186c00000ffd5aefd70e72229c038a8dbbfcaeec112b966c3fc50aca4e90eef3ca24f5f28cd057b8af8368819d01daa2c68cbddafecdd59a15d3bda9ab6bc22
7
- data.tar.gz: e9194364870a3c2039dfe6e577991561c81fb1a6ab50a489579259651068267a89db9615b2882646f8f9560eb72fcf11baf54733c932000cc93051f6ee02a071
6
+ metadata.gz: 1ec0e319b221759aa64509c7550e0fd2d2187864d083e5ad90e13cdb7e2a4f5ee70dd2f24e3c76872846179d90bc581b987e7d3a09a6e511f308e7814bb759d8
7
+ data.tar.gz: 41fdfa1e968dd6fabe723f687fd47ae39fec66061ca7123107b771cec4253cc35a78116a4c99b33beb2e2f4a6918acce9d7f05e53efd2f75a98c861475f911ec
@@ -1,11 +1,13 @@
1
1
  <% if defined?(title) %>
2
2
  <%
3
3
  description_text ||= false
4
- description_govspeak ||= yield || ""
4
+ description_govspeak ||= false
5
+ description ||= yield || false
5
6
  margin_bottom_class = " gem-c-notice--bottom-margin" unless local_assigns[:margin_bottom]
7
+ description_present = description.present? || description_text.present? || description_govspeak.present?
6
8
  %>
7
9
  <section class="gem-c-notice<%= margin_bottom_class %>" aria-label="Notice" role="region">
8
- <% if description_text.present? || description_govspeak.present? %>
10
+ <% if description_present %>
9
11
  <h2 class="gem-c-notice__title"><%= title %></h2>
10
12
  <% else %>
11
13
  <span class="gem-c-notice__title"><%= title %></span>
@@ -15,7 +17,11 @@
15
17
  <p class="gem-c-notice__description"><%= description_text %></p>
16
18
  <% end %>
17
19
 
18
- <% unless description_govspeak.empty? %>
20
+ <% if description %>
21
+ <%= description %>
22
+ <% end %>
23
+
24
+ <% if description_govspeak.present? %>
19
25
  <%= render 'govuk_publishing_components/components/govspeak', content: description_govspeak %>
20
26
  <% end %>
21
27
  </section>
@@ -13,6 +13,14 @@ examples:
13
13
  default:
14
14
  data:
15
15
  title: 'Statistics release cancelled'
16
+ with_description:
17
+ data:
18
+ title: 'Statistics release cancelled'
19
+ description: '<p>The Oil &amp; Gas Authority launched a new website on 3 October 2016 to reflect its new status as a government company.</p><p>This formalises the transfer of the Secretary of State’s regulatory powers in respect of oil and gas to the OGA, and grants it new powers. This website will no longer be updated. Visitors should refer to <a rel="external" href="https://www.ogauthority.co.uk/news-publications/announcements/2015/establishment-of-the-oil-and-gas-authority-1/">www.ogauthority.co.uk</a></p>'
20
+ with_description_from_a_block:
21
+ data:
22
+ title: 'Statistics release update'
23
+ block: '<p>The Oil &amp; Gas Authority launched a new website on 3 October 2016 to reflect its new status as a government company.</p><p>This formalises the transfer of the Secretary of State’s regulatory powers in respect of oil and gas to the OGA, and grants it new powers. This website will no longer be updated. Visitors should refer to <a rel="external" href="https://www.ogauthority.co.uk/news-publications/announcements/2015/establishment-of-the-oil-and-gas-authority-1/">www.ogauthority.co.uk</a></p>'
16
24
  with_description_text:
17
25
  data:
18
26
  title: 'Statistics release cancelled'
@@ -21,10 +29,6 @@ examples:
21
29
  data:
22
30
  title: 'Statistics release update'
23
31
  description_govspeak: '<p>The Oil &amp; Gas Authority launched a new website on 3 October 2016 to reflect its new status as a government company.</p><p>This formalises the transfer of the Secretary of State’s regulatory powers in respect of oil and gas to the OGA, and grants it new powers. This website will no longer be updated. Visitors should refer to <a rel="external" href="https://www.ogauthority.co.uk/news-publications/announcements/2015/establishment-of-the-oil-and-gas-authority-1/">www.ogauthority.co.uk</a></p>'
24
- with_govspeak_from_a_block:
25
- data:
26
- title: 'Statistics release update'
27
- block: '<p>The Oil &amp; Gas Authority launched a new website on 3 October 2016 to reflect its new status as a government company.</p><p>This formalises the transfer of the Secretary of State’s regulatory powers in respect of oil and gas to the OGA, and grants it new powers. This website will no longer be updated. Visitors should refer to <a rel="external" href="https://www.ogauthority.co.uk/news-publications/announcements/2015/establishment-of-the-oil-and-gas-authority-1/">www.ogauthority.co.uk</a></p>'
28
32
  with_markup_in_the_title:
29
33
  description: In some circumstances it may be necessary to include simple markup in the title, such as a link. Note that this will be wrapped in a H2 tag if there is no description included, so be sure that any markup inserted is valid inside that tag (e.g. another heading tag inside a H2 would be invalid).
30
34
  data:
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = '15.0.0'.freeze
2
+ VERSION = '15.1.0'.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: 15.0.0
4
+ version: 15.1.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: 2019-02-12 00:00:00.000000000 Z
11
+ date: 2019-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govspeak