content_block_tools 0.13.0 → 0.15.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: a7fb206c79f70f74406c8a60d9a9700edc36dd3d1b770aa20bec8f66882e9ace
|
4
|
+
data.tar.gz: 57ea041ddeedc73c7cd4ee6f0dc14ab6f9936e6c0c37f04cd871f3272160f199
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47025bb1c515acfe6c6a13efbeea0c7112982312d238f2ca1d2de085920c36204acfffcde065cf34d3081b61a80bdf4f514ca962b610c704cc3b7369441073a6
|
7
|
+
data.tar.gz: cc3b70d529ed13abc838f84fc3b8fa7a88a52efc9f3bc9472b591002e0c59bd495da56ba7f7a524faa52c2d899d7366c09a19bdf8f6bf000584b413897c2f590
|
data/CHANGELOG.md
CHANGED
@@ -7,6 +7,14 @@
|
|
7
7
|
useful summary for people upgrading their application, not a replication
|
8
8
|
of the commit log.
|
9
9
|
|
10
|
+
## 0.15.0
|
11
|
+
|
12
|
+
- Rename content block classes ([72](https://github.com/alphagov/govuk_content_block_tools/pull/72))
|
13
|
+
|
14
|
+
## 0.14.0
|
15
|
+
|
16
|
+
- Update telephone to support simple opening hours ([71](https://github.com/alphagov/govuk_content_block_tools/pull/71))
|
17
|
+
|
10
18
|
## 0.13.0
|
11
19
|
|
12
20
|
- Rename Contact Form to Contact Link ([70](https://github.com/alphagov/govuk_content_block_tools/pull/70))
|
@@ -41,10 +41,10 @@ module ContentBlockTools
|
|
41
41
|
content_tag(
|
42
42
|
base_tag,
|
43
43
|
content,
|
44
|
-
class: %W[content-
|
44
|
+
class: %W[content-block content-block--#{document_type}],
|
45
45
|
data: {
|
46
46
|
content_block: "",
|
47
|
-
document_type:
|
47
|
+
document_type: document_type,
|
48
48
|
content_id: content_block.content_id,
|
49
49
|
embed_code: content_block.embed_code,
|
50
50
|
},
|
@@ -129,6 +129,10 @@ module ContentBlockTools
|
|
129
129
|
def embedded_objects
|
130
130
|
self.class.instance_variable_get("@embedded_objects")
|
131
131
|
end
|
132
|
+
|
133
|
+
def document_type
|
134
|
+
content_block.document_type.delete_prefix("content_block_")
|
135
|
+
end
|
132
136
|
end
|
133
137
|
end
|
134
138
|
end
|
@@ -14,7 +14,7 @@ module ContentBlockTools
|
|
14
14
|
concat number_list
|
15
15
|
concat video_relay_service
|
16
16
|
concat bsl_details
|
17
|
-
concat
|
17
|
+
concat opening_hours
|
18
18
|
concat call_charges_link
|
19
19
|
end
|
20
20
|
end
|
@@ -71,12 +71,10 @@ module ContentBlockTools
|
|
71
71
|
render_govspeak(bsl_guidance[:value], root_class: "govuk-!-margin-bottom-0") if bsl_guidance[:show]
|
72
72
|
end
|
73
73
|
|
74
|
-
def
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
end
|
79
|
-
end
|
74
|
+
def opening_hours
|
75
|
+
opening_hours = item[:opening_hours] || {}
|
76
|
+
|
77
|
+
render_govspeak(opening_hours[:opening_hours], root_class: "govuk-!-margin-bottom-0") if opening_hours[:show_opening_hours]
|
80
78
|
end
|
81
79
|
|
82
80
|
def opening_hours_list_item(item)
|