govuk_navigation_helpers 8.1.1 → 8.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2097d9cbeb05c288dd203fc0daa94ee9fa2d3a6a
4
- data.tar.gz: d03f10f2eb85b2702a0eb65810f4715a609d7f30
3
+ metadata.gz: 00d6196b7af9cb3f946c7619095daeb9926207c1
4
+ data.tar.gz: 594c10714eaf2c263878be7371f20a31a47b83a0
5
5
  SHA512:
6
- metadata.gz: bb9517734393c5b1fc4862be6354e70c0db2e5fa364910ba613990c74a5bb9a3c20b1b5d908f96ccfee01d7848e6c5d8a347033998a78a193cf43e3366cad43c
7
- data.tar.gz: 0cc1644665f14aacb99a905af0913072e0b7e4219d6c28b1d06da806fd403f3f7e2db5c44eb144fae82b56dd629f904ca577f5cdc8eb967287f80dc998ede264
6
+ metadata.gz: 2af437186445b73d36b31b6abe2528a9c0b70345534fb06679215334625d786a89b8cb8f324abc572753585da52cd69fe7a86ffa2ff106986c6b14bd11b74be7
7
+ data.tar.gz: ee8020c7eb9e6b53997df336fb8093e76895881408b377ef85ce7df9aac474b2b9592901483b3f10ec02f8d23644d7683804103c9c8569ba28585437ff301df8
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 8.2.0
2
+ * Update related navigation sidebar helper to return mainstream topics alongside whitehall topics
3
+ * Update content in the /end-a-civil-partnership, /get-a-divorce tasklists
4
+
1
5
  ## 8.1.1
2
6
  * Update content in the /end-a-civil-partnership, /get-a-divorce, and /learn-to-drive-a-car tasklists
3
7
  * Strip non-alphanumeric characters from world location links for related navigation helper.
@@ -96,7 +96,7 @@
96
96
  "contents": [
97
97
  {
98
98
  "type": "paragraph",
99
- "text": "You should try to agree how you'll deal with your children, money and property before you apply to end your civil partnership."
99
+ "text": "You should try to agree the arrangements for looking after your children and work out any money or property issues before you apply to end your civil partnership."
100
100
  },
101
101
  {
102
102
  "type": "list",
@@ -186,11 +186,11 @@
186
186
  },
187
187
  {
188
188
  "type": "paragraph",
189
- "text": "Your civil partner will receive a copy of the dissolution application. You'll be told when they respond and what you'll need to do next."
189
+ "text": "Your husband or wife will receive a copy of the dissolution application. When they respond, you'll be told what you need to do next."
190
190
  },
191
191
  {
192
192
  "type": "paragraph",
193
- "text": "You might need to get legal advice if your civil partner disagrees with your application."
193
+ "text": "You might need to get legal advice if they disagree with the application."
194
194
  },
195
195
  {
196
196
  "type": "list",
@@ -202,6 +202,10 @@
202
202
  }
203
203
  ]
204
204
  },
205
+ {
206
+ "type": "paragraph",
207
+ "text": "If they don't respond, you'll need to prove that they've received the application. For example, by using a bailiff to deliver it to them."
208
+ },
205
209
  {
206
210
  "type": "substep",
207
211
  "optional": true
@@ -212,7 +216,7 @@
212
216
  {
213
217
  "href": "/divorce-missing-husband-wife",
214
218
  "text": "Find your civil partner's address",
215
- "context": "£0 to £100"
219
+ "context": "£0 to £150"
216
220
  },
217
221
  {
218
222
  "href": "/end-civil-partnership/if-your-partner-lacks-mental-capacity",
@@ -234,7 +238,7 @@
234
238
  "contents": [
235
239
  {
236
240
  "type": "paragraph",
237
- "text": "If the court agrees with your dissolution application, you can apply for a document called a 'conditional order'. You can give more information about why the civil partnership has broken down."
241
+ "text": "The court will tell you if you can continue with your dissolution application. You'll need to apply for a document called a 'conditional order'. You can give more information about why the civil partnership has broken down."
238
242
  },
239
243
  {
240
244
  "type": "list",
@@ -293,7 +297,7 @@
293
297
  "contents": [
294
298
  {
295
299
  "type": "paragraph",
296
- "text": "Once you, your civil partner and the court all agree, you can apply for a document called a 'final order' to end your civil partnership. You can do this 6 weeks to 12 months after you receive the conditional order."
300
+ "text": "Once you, your civil partner and the court all agree, you can apply for a document called a 'final order' to end your civil partnership. You can do this 6 weeks after you receive the conditional order."
297
301
  },
298
302
  {
299
303
  "type": "paragraph",
@@ -322,6 +326,7 @@
322
326
  "type": "paragraph",
323
327
  "text": "Once it's approved, they'll send you both a copy of the final order to say your civil partnership has legally ended."
324
328
  }
329
+
325
330
  ]
326
331
  }
327
332
  ]
@@ -98,10 +98,11 @@
98
98
  "contents": [
99
99
  {
100
100
  "type": "paragraph",
101
- "text": "You should try to agree how you'll deal with your children, money and property before you start your divorce."
101
+ "text": "You should try to agree the arrangements for looking after your children and work out any money or property issues before you start your divorce."
102
102
  },
103
103
  {
104
104
  "type": "list",
105
+ "style": "required",
105
106
  "contents": [
106
107
  {
107
108
  "href": "/looking-after-children-divorce",
@@ -164,7 +165,7 @@
164
165
  },
165
166
  {
166
167
  "href": "/divorce/grounds-for-divorce",
167
- "text": "Check the list of reasons why you can get a divorce"
168
+ "text": "Check the reasons you can get a divorce (the 'grounds for divorce')"
168
169
  },
169
170
  {
170
171
  "href": "http://hmctsformfinder.justice.gov.uk/HMCTS/GetForm.do?court_forms_id=1115",
@@ -187,11 +188,11 @@
187
188
  },
188
189
  {
189
190
  "type": "paragraph",
190
- "text": "Your husband or wife will receive a copy of the divorce petition. You'll be told when they respond and what you'll need to do next."
191
+ "text": "Your husband or wife will receive a copy of the divorce petition. When they respond, you'll be told what you need to do next."
191
192
  },
192
193
  {
193
194
  "type": "paragraph",
194
- "text": "You might need to get legal advice if your husband or wife disagrees with your divorce petition."
195
+ "text": "You might need to get legal advice if they disagree with the petition."
195
196
  },
196
197
  {
197
198
  "type": "list",
@@ -203,6 +204,10 @@
203
204
  }
204
205
  ]
205
206
  },
207
+ {
208
+ "type": "paragraph",
209
+ "text": "If they don't respond, you'll need to prove that they've received the petition. For example, by using a bailiff to deliver it to them."
210
+ },
206
211
  {
207
212
  "type": "substep",
208
213
  "optional": true
@@ -213,7 +218,7 @@
213
218
  {
214
219
  "href": "/divorce-missing-husband-wife",
215
220
  "text": "Find your husband or wife’s address",
216
- "context": "£0 to £100"
221
+ "context": "£0 to £150"
217
222
  },
218
223
  {
219
224
  "href": "/divorce/if-your-husband-or-wife-lacks-mental-capacity",
@@ -235,7 +240,7 @@
235
240
  "contents": [
236
241
  {
237
242
  "type": "paragraph",
238
- "text": "If the court agrees with your divorce petition, you can apply for a document called a 'decree nisi'. You can give more information about why the marriage has broken down."
243
+ "text": "The court will tell you if you can continue with your divorce petition. You'll need to apply for a document called a 'decree nisi'. You can give more information about why the marriage has broken down."
239
244
  },
240
245
  {
241
246
  "type": "list",
@@ -294,7 +299,7 @@
294
299
  "contents": [
295
300
  {
296
301
  "type": "paragraph",
297
- "text": "Once you, your husband or wife, and the court all agree, you can apply for the final document to end your marriage. This is called a 'decree absolute'. You can do this 6 weeks to 12 months after you receive the decree nisi."
302
+ "text": "Once you, your husband or wife, and the court all agree, you can apply for the final document to end your marriage. This is called a 'decree absolute'. You can do this 6 weeks after you receive the decree nisi."
298
303
  },
299
304
  {
300
305
  "type": "paragraph",
@@ -70,7 +70,9 @@ module GovukNavigationHelpers
70
70
  end
71
71
 
72
72
  def related_topics
73
- build_links_for_sidebar(@content_item.related_topics)
73
+ topics = build_links_for_sidebar(@content_item.related_topics)
74
+ topics << related_mainstream_topic << related_mainstream_parent_topic
75
+ topics.compact
74
76
  end
75
77
 
76
78
  def related_topical_events
@@ -93,6 +95,16 @@ module GovukNavigationHelpers
93
95
  ]
94
96
  end
95
97
 
98
+ def related_mainstream_topic
99
+ return unless grouped.tagged_to_same_mainstream_browse_page.any?
100
+ { text: @content_item.parent.title, path: @content_item.parent.base_path }
101
+ end
102
+
103
+ def related_mainstream_parent_topic
104
+ return unless grouped.parents_tagged_to_same_mainstream_browse_page.any?
105
+ { text: @content_item.parent.parent.title, path: @content_item.parent.parent.base_path }
106
+ end
107
+
96
108
  def parameterise(str, sep = "-")
97
109
  parameterised_str = str.gsub(/[^\w\-]+/, sep)
98
110
  unless sep.nil? || sep.empty?
@@ -104,5 +116,9 @@ module GovukNavigationHelpers
104
116
  end
105
117
  parameterised_str.downcase
106
118
  end
119
+
120
+ def grouped
121
+ @grouped ||= GroupedRelatedLinks.new(@content_item)
122
+ end
107
123
  end
108
124
  end
@@ -1,3 +1,3 @@
1
1
  module GovukNavigationHelpers
2
- VERSION = "8.1.1".freeze
2
+ VERSION = "8.2.0".freeze
3
3
  end
@@ -52,12 +52,30 @@ RSpec.describe GovukNavigationHelpers::RelatedNavigationSidebar do
52
52
  "delivered_on" => "2017-09-22T14:30:00+01:00"
53
53
  },
54
54
  "links" => {
55
+ "parent" => [
56
+ {
57
+ "content_id" => "32c1b93d-2553-47c9-bc3c-fc5b513ecc32",
58
+ "locale" => "en",
59
+ "base_path" => "/mainstream-topic",
60
+ "title" => "mainstream topic"
61
+ }
62
+ ],
55
63
  "ordered_related_items" => [
56
64
  {
57
65
  "content_id" => "32c1b93d-2553-47c9-bc3c-fc5b513ecc32",
58
66
  "locale" => "en",
59
67
  "base_path" => "/related-item",
60
- "title" => "related item"
68
+ "title" => "related item",
69
+ "links" => {
70
+ "mainstream_browse_pages" => [
71
+ {
72
+ "content_id" => "32c1b93d-2553-47c9-bc3c-fc5b513ecc32",
73
+ "locale" => "en",
74
+ "base_path" => "/mainstream-topic",
75
+ "title" => "mainstream topic"
76
+ }
77
+ ]
78
+ }
61
79
  }
62
80
  ],
63
81
  "document_collections" => [
@@ -118,7 +136,7 @@ RSpec.describe GovukNavigationHelpers::RelatedNavigationSidebar do
118
136
  expected = {
119
137
  related_items: [{ path: "/related-item", text: "related item" }],
120
138
  collections: [{ path: "/related-collection", text: "related collection" }],
121
- topics: [{ path: "/related-topic", text: "related topic" }],
139
+ topics: [{ path: "/related-topic", text: "related topic" }, { path: "/mainstream-topic", text: "mainstream topic" }],
122
140
  topical_events: [{ path: "/related-topical-event", text: "related topical event" }],
123
141
  policies: [{ path: "/related-policy", text: "related policy" }],
124
142
  publishers: [{ path: "/related-organisation", text: "related organisation" }],
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_navigation_helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.1.1
4
+ version: 8.2.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: 2017-12-20 00:00:00.000000000 Z
11
+ date: 2018-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gds-api-adapters