ccs-frontend_helpers 0.1.0.rc.3 → 0.1.0.rc.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -1
- data/Gemfile.lock +1 -1
- data/lib/ccs/components/govuk/summary_list/row.rb +4 -2
- data/lib/ccs/components/govuk/summary_list.rb +1 -1
- data/lib/ccs/frontend_helpers/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: 1771993ecf89c88ed73db635304b30f1b138ddfb3d113256f4ea6e37a31410e3
|
4
|
+
data.tar.gz: 9cbef221d21d7643742d3ae965d6de8a644ed069ca81639f128de03913eb51e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 766cc075836af76d3562f8b0c9dd4193d64df77bd29218503c9bbfae2c2c6bd4a07264ac0254fc49d23fb3b4c6de0c584f6d7b1b51f4d825abe844cdcfc68f2d
|
7
|
+
data.tar.gz: 3e0b8e149adfc22d5816adb7748deb8d51b586445c3f0ab7dbc9d3de994eadf2e38094804c82fc7add6ddf2fce3f8d8e18a713feae286603332ace892c991c48
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -36,11 +36,13 @@ module CCS
|
|
36
36
|
def initialize(any_row_has_actions:, key:, value:, actions: nil, **options)
|
37
37
|
super(**options)
|
38
38
|
|
39
|
-
|
39
|
+
actions_present = actions && actions[:items].present?
|
40
|
+
|
41
|
+
@options[:attributes][:class] << ' govuk-summary-list__row--no-actions' if any_row_has_actions && !actions_present
|
40
42
|
|
41
43
|
@key = Key.new(context: @context, **key)
|
42
44
|
@value = Value.new(context: @context, **value)
|
43
|
-
@actions = Actions.new(context: @context, **actions) if
|
45
|
+
@actions = Actions.new(context: @context, **actions) if actions_present
|
44
46
|
end
|
45
47
|
|
46
48
|
# Generates the HTML for the GOV.UK Summary list row
|
@@ -33,7 +33,7 @@ module CCS
|
|
33
33
|
def initialize(summary_list_items:, card: nil, **options)
|
34
34
|
super(**options)
|
35
35
|
|
36
|
-
any_row_has_actions = summary_list_items.any? { |summary_list_item| summary_list_item
|
36
|
+
any_row_has_actions = summary_list_items.any? { |summary_list_item| summary_list_item.dig(:actions, :items).present? }
|
37
37
|
|
38
38
|
@summary_list_rows = summary_list_items.map { |summary_list_item| Row.new(any_row_has_actions: any_row_has_actions, context: @context, **summary_list_item) }
|
39
39
|
@card = Card.new(context: @context, **card) if card
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ccs-frontend_helpers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.rc.
|
4
|
+
version: 0.1.0.rc.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- tim-s-ccs
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|