govuk_publishing_components 9.21.0 → 9.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb +2 -1
- data/app/views/govuk_publishing_components/components/_step_by_step_nav_related.html.erb +2 -1
- data/app/views/govuk_publishing_components/components/docs/step_by_step_nav_related.yml +14 -0
- data/lib/govuk_publishing_components/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1b36fe4ccab49dcd2c4b4d65d06357e597bbc34afd0c161c60f1e03e14c37d1b
|
|
4
|
+
data.tar.gz: 48ad98ac8fa9e64874ea0057139e86d47a3f78e3139f5618fca3efedd5ec3dd8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
+
]
|
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.
|
|
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-
|
|
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
|