govuk_publishing_components 9.21.0 → 9.22.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: 55ad79f1bb2e0d87fefc7c68af65e712885251ecf110806681bdb8a387e84fac
4
- data.tar.gz: 61591e06015bcac46ec5646e43a7580f7afa018f88d38bd318cf061c0ada9b1a
3
+ metadata.gz: 1b36fe4ccab49dcd2c4b4d65d06357e597bbc34afd0c161c60f1e03e14c37d1b
4
+ data.tar.gz: 48ad98ac8fa9e64874ea0057139e86d47a3f78e3139f5618fca3efedd5ec3dd8
5
5
  SHA512:
6
- metadata.gz: cc27199d7464e20dcf691f0580ffc4304e50c2e4615f185337062fdaab57cd84d791b599cf2ae22141e31505e05eb16fb0e67a293a7834d14fc2e395721c5815
7
- data.tar.gz: 97da9fd42557e53dc5505f4b5794d9e9e3349ce2b62738a8138f720d2bab7178da11082a7ef7df3e3bf1935272fd5c30e71a3e4a1c900784935a6ffa214ac54b
6
+ metadata.gz: 115ecba9b2377c798ea70b1f12813575def0fb15510ef51275bcd7db07e057189c42e9732192ec06d6648e598497b490d3c5737957e50413005a7d6fe47037bb
7
+ data.tar.gz: e5ef52fc4747b5aeaa726be790f272fc63bbb91acbfbb1f15abd3a8eb8d66bd3e20d4f3d02064a26ae36668195b5d2717302f08348d63e19c602e9b9894aeab6
@@ -27,7 +27,8 @@
27
27
  <!-- Rendering step by step related items because there are a few but not too many of them -->
28
28
  <%= render 'govuk_publishing_components/components/step_by_step_nav_related', {
29
29
  pretitle: "Also part of",
30
- links: navigation.step_nav_helper.also_part_of_step_nav
30
+ links: navigation.step_nav_helper.also_part_of_step_nav,
31
+ always_display_as_list: true
31
32
  } %>
32
33
  <% end %>
33
34
  </div>
@@ -1,6 +1,7 @@
1
1
  <%
2
2
  links ||= []
3
3
  pretitle ||= t("govuk_component.step_by_step_nav_related.part_of", default: "Part of")
4
+ always_display_as_list ||= false
4
5
  %>
5
6
  <% if links.any? %>
6
7
  <div
@@ -8,7 +9,7 @@
8
9
  data-module="track-click">
9
10
  <h2 class="gem-c-step-nav-related__heading">
10
11
  <span class="gem-c-step-nav-related__pretitle"><%= pretitle %></span>
11
- <% if links.length == 1 %>
12
+ <% if links.length == 1 && !always_display_as_list %>
12
13
  <a href="<%= links[0][:href] %>"
13
14
  class="gem-c-step-nav-related__link"
14
15
  data-track-category="stepNavPartOfClicked"
@@ -62,3 +62,17 @@ examples:
62
62
  tracking_id: 'this-is-the-tracking-id'
63
63
  }
64
64
  ]
65
+ always_display_as_a_list:
66
+ description: |
67
+ when this component is rendered alongside an expanded step by step, we want it to render as a heading.
68
+ However, in some cases the component will not be followed by a step by step, for example [Book Driving Test](https://www.gov.uk/book-driving-test).
69
+ In these cases, the heading is not followed by any content, so it should be rendered as a list instead.
70
+ data:
71
+ pretitle: 'Also part of'
72
+ always_display_as_list: true
73
+ links: [
74
+ {
75
+ href: '/learn-to-drive-a-motorbike',
76
+ text: 'Learn to drive a motorbike: step by step'
77
+ }
78
+ ]
@@ -1,3 +1,3 @@
1
1
  module GovukPublishingComponents
2
- VERSION = '9.21.0'.freeze
2
+ VERSION = '9.22.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: 9.21.0
4
+ version: 9.22.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: 2018-09-14 00:00:00.000000000 Z
11
+ date: 2018-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: govuk_app_config