govuk_publishing_components 9.18.0 → 9.19.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/assets/stylesheets/govuk_publishing_components/components/_error-summary.scss +2 -0
- data/app/views/govuk_publishing_components/components/_error_summary.html.erb +17 -7
- data/app/views/govuk_publishing_components/components/docs/error_summary.yml +1 -2
- 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: 5d47c0f1a027c444e13130f4a1653e81c970369f8a12dfc287b18f822e3cc8cb
|
|
4
|
+
data.tar.gz: 41e27deae34274a7a801b42fc4189cd1a0807196ccabf10c6622d9b775d5dd4d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 537ee31aa00db01fe094653f18a14a55e1509c7afeef9bac9194ec8eca98b84a8f9b61129ed2eee784700a8fef99615dde9c7d09317adad9c3a2a36e87ec373c
|
|
7
|
+
data.tar.gz: c707c68d10de23995acbfb23322cf0d65612367f74367ec2038dfa3a7139a8927026316247412fc022dd9e4798bbf9cabd5a53b6c6e0303608f626910a68ea6c
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
<%
|
|
2
|
+
title ||= false
|
|
2
3
|
description ||= false
|
|
3
4
|
items ||= []
|
|
4
5
|
title_id ||= "error-summary-title-#{SecureRandom.hex(4)}"
|
|
6
|
+
if items.empty? && !title
|
|
7
|
+
raise ArgumentError, "The error_summary component needs at least one item or a title in order to render."
|
|
8
|
+
end
|
|
5
9
|
%>
|
|
6
10
|
<div
|
|
7
11
|
class="gem-c-error-summary"
|
|
@@ -10,9 +14,11 @@
|
|
|
10
14
|
role="alert"
|
|
11
15
|
tabindex="-1"
|
|
12
16
|
>
|
|
13
|
-
|
|
14
|
-
<%=
|
|
15
|
-
|
|
17
|
+
<% if title %>
|
|
18
|
+
<h2 class="gem-c-error-summary__title" id="<%= title_id %>">
|
|
19
|
+
<%= title %>
|
|
20
|
+
</h2>
|
|
21
|
+
<% end %>
|
|
16
22
|
<div class="gem-c-error-summary__body">
|
|
17
23
|
<% if description %>
|
|
18
24
|
<p class="gem-c-error-summary__text"><%= description %></p>
|
|
@@ -21,10 +27,14 @@
|
|
|
21
27
|
<ul class="gem-c-error-summary__list">
|
|
22
28
|
<% items.each_with_index do |item, index| %>
|
|
23
29
|
<li class="gem-c-error-summary__list__item">
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
30
|
+
<% if item[:href] %>
|
|
31
|
+
<a
|
|
32
|
+
class="js-error-summary__link gem-c-error-summary__link"
|
|
33
|
+
href="<%= item[:href] %>"
|
|
34
|
+
><%= item[:text] %></a>
|
|
35
|
+
<% else %>
|
|
36
|
+
<%= item[:text] %>
|
|
37
|
+
<% end %>
|
|
28
38
|
</li>
|
|
29
39
|
<% end %>
|
|
30
40
|
</ul>
|
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.19.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-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: govuk_app_config
|