govuk_publishing_components 21.43.0 → 21.44.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b748fce14e3d526274e597a0136feff3f1bbba9c1eb6018c0a95c2344591ea28
|
4
|
+
data.tar.gz: '09b7bf5ba0dbc2ccbd9a95b108321a1d30a996eae72e2916fa8b3f3f859c3774'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 962cba3ec7bad947b7a70a53faa3f23af376d276bca8428bc26d9a364ecf768f41f7f096782f5c0714206ed12a0f1f17151e9c5b881c0f0638cf4ec46d15b10d
|
7
|
+
data.tar.gz: 9c85e249a91ae4c8e1450efb3916aa6331b7e1f7fddc633beeab3f51f244e9b90febf27f60eb21df27c74b3f25f38ef49ef5017c655b4efa7a469f374739dd4d
|
@@ -37,20 +37,22 @@
|
|
37
37
|
<%= tag.ul class: "govuk-summary-list__actions-list" do %>
|
38
38
|
<% if item.fetch(:edit, {}).any? %>
|
39
39
|
<%= tag.li class: "govuk-summary-list__actions-list-item" do %>
|
40
|
+
<% edit_link_text = item[:edit][:link_text] || "Change" %>
|
40
41
|
<%= link_to item[:edit].fetch(:href),
|
41
42
|
class: "govuk-link",
|
42
|
-
title: "
|
43
|
+
title: "#{edit_link_text} #{item[:field]}",
|
43
44
|
data: item[:edit].fetch(:data_attributes, {}) do %>
|
44
|
-
|
45
|
+
<%= edit_link_text %><%= tag.span " #{item[:field]}", class: "govuk-visually-hidden" %><% end %>
|
45
46
|
<% end %>
|
46
47
|
<% end %>
|
47
48
|
<% if item.fetch(:delete, {}).any? %>
|
48
49
|
<%= tag.li class: "govuk-summary-list__actions-list-item" do %>
|
50
|
+
<% delete_link_text = item[:delete][:link_text] || "Delete" %>
|
49
51
|
<%= link_to item[:delete].fetch(:href),
|
50
52
|
class: "govuk-link",
|
51
|
-
title: "
|
53
|
+
title: "#{delete_link_text} #{item[:field]}",
|
52
54
|
data: item[:delete].fetch(:data_attributes, {}) do %>
|
53
|
-
|
55
|
+
<%= delete_link_text %><%= tag.span " #{item[:field]}", class: "govuk-visually-hidden" %>
|
54
56
|
<% end %>
|
55
57
|
<% end %>
|
56
58
|
<% end %>
|
@@ -42,6 +42,10 @@ examples:
|
|
42
42
|
gtm: "edit-title-summary-body"
|
43
43
|
|
44
44
|
with_custom_link_on_section:
|
45
|
+
description: |
|
46
|
+
Take care that the provided `link_text` still makes sense to screen readers when combined with the title.
|
47
|
+
For instance, `Reorder` link text and `Items` title becomes `Reorder Items`, which reads fine, but link text
|
48
|
+
of `Summary` would read as `Summary Items`, which does not make sense.
|
45
49
|
data:
|
46
50
|
edit:
|
47
51
|
href: "custom-link"
|
@@ -54,12 +58,9 @@ examples:
|
|
54
58
|
value: "Value 2"
|
55
59
|
- field: "Item 3"
|
56
60
|
value: "Value 3"
|
57
|
-
accessibility_criteria: |
|
58
|
-
Take care that the provided `link_text` still makes sense to screen readers when combined with the title.
|
59
|
-
For instance, `Reorder` link text and `Items` title becomes `Reorder Items`, which reads fine, but link text
|
60
|
-
of `Summary` would read as `Summary Items`, which does not make sense.
|
61
61
|
|
62
62
|
with_edit_on_individual_items:
|
63
|
+
description: The link text can be optionally modified using the 'link_text' parameter, as for the edit link in previous examples.
|
63
64
|
data:
|
64
65
|
title: "Title, summary and body"
|
65
66
|
items:
|
@@ -67,6 +68,7 @@ examples:
|
|
67
68
|
value: "Ethical standards for public service providers"
|
68
69
|
edit:
|
69
70
|
href: "edit-title"
|
71
|
+
text: "Edit"
|
70
72
|
data_attributes:
|
71
73
|
gtm: "edit-title"
|
72
74
|
- field: "Summary"
|
@@ -79,8 +81,10 @@ examples:
|
|
79
81
|
value: "After the government decided in 2013 to expand the remit of the Committee to include public service providers, the Committee on Standards in Public Life produced our first report on the issue: Ethical Standards for Providers of Public Services in 2014."
|
80
82
|
edit:
|
81
83
|
href: "edit-body"
|
84
|
+
link_text: "Edit"
|
82
85
|
delete:
|
83
86
|
href: "delete-body"
|
87
|
+
link_text: "Remove"
|
84
88
|
|
85
89
|
with_block:
|
86
90
|
description: Use the summary list with a block when you need to show an empty state message or load another component.
|
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.
|
4
|
+
version: 21.44.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: 2020-05-
|
11
|
+
date: 2020-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gds-api-adapters
|