content_block_tools 0.10.0 → 0.11.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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c52e34cc23cba69ff684cf24401cd78982eca8566ecbf7003f4d95b09ecf5e4c
|
4
|
+
data.tar.gz: ac0ab24be15c2a8485fb7364e68c63afcef338a1038050caaaf2d1b838169c53
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5dc783c3a7697d8d7b52fd3067b0c33238666f237664735e97efcbd26ee17bb69e50e03a7629bce0afd7ac23d50270250b3cab07ce055fcb8be52adb44571ae7
|
7
|
+
data.tar.gz: 8464890505ccea65c1da3557a8838e156f86e39f105e86c53c534cb37cdf16e50adbbb16db9d17b1ffcddd21190dd9227843634b9599578ebf430108f156c1f2
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,10 @@
|
|
7
7
|
useful summary for people upgrading their application, not a replication
|
8
8
|
of the commit log.
|
9
9
|
|
10
|
+
## 0.11.0
|
11
|
+
|
12
|
+
- Update address and contact presenter to match model changes([61](https://github.com/alphagov/govuk_content_block_tools/pull/61))
|
13
|
+
|
10
14
|
## 0.10.0
|
11
15
|
|
12
16
|
- Add content block titles to individual contact blocks ([60](https://github.com/alphagov/govuk_content_block_tools/pull/60))
|
@@ -10,7 +10,7 @@ module ContentBlockTools
|
|
10
10
|
def render
|
11
11
|
wrapper do
|
12
12
|
content_tag(:p, class: "adr") do
|
13
|
-
%i[street_address
|
13
|
+
%i[street_address town_or_city state_or_county postal_code country].map { |field|
|
14
14
|
next if item[field].blank?
|
15
15
|
|
16
16
|
content_tag(:span, item[field], { class: class_for_field_name(field) })
|
@@ -22,8 +22,8 @@ module ContentBlockTools
|
|
22
22
|
def class_for_field_name(field_name)
|
23
23
|
{
|
24
24
|
street_address: "street-address",
|
25
|
-
|
26
|
-
|
25
|
+
town_or_city: "locality",
|
26
|
+
state_or_county: "region",
|
27
27
|
postal_code: "postal-code",
|
28
28
|
country: "country-name",
|
29
29
|
}[field_name]
|