content_block_tools 0.12.3 → 0.14.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/CHANGELOG.md +8 -0
- data/content_block_tools.gemspec +2 -2
- data/lib/content_block_tools/presenters/block_presenters/contact/{contact_form_presenter.rb → contact_link_presenter.rb} +1 -1
- data/lib/content_block_tools/presenters/block_presenters/contact/telephone_presenter.rb +5 -7
- data/lib/content_block_tools/presenters/contact_presenter.rb +2 -2
- data/lib/content_block_tools/version.rb +1 -1
- data/lib/content_block_tools.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c35f73a3b07fb8b012edb15983ee33d887d6210983da08260ef5aa4ee179602
|
4
|
+
data.tar.gz: 7957496b23bb4abf3631ed7119bf389c62f545d03e16caf805072c485baf0e7b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9eb65abd8380bcf954c049343336d5ad9aa964c19fec7587c4769fe741e82777f7127a99540c1cf884a889ff4d72a68ecc52a4f8e4510c93a13f9a728f6ad6bf
|
7
|
+
data.tar.gz: 79fa8d0a4b48ef725ebade643c9556422b0dac61874aed1ce9323fbf258f8622c0cdcd40874876f0ceb3f6447976b2bac3319ed97e5f2e1d6d757b8d1036a9bb
|
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.14.0
|
11
|
+
|
12
|
+
- Update telephone to support simple opening hours ([71](https://github.com/alphagov/govuk_content_block_tools/pull/70))
|
13
|
+
|
14
|
+
## 0.13.0
|
15
|
+
|
16
|
+
- Rename Contact Form to Contact Link ([70](https://github.com/alphagov/govuk_content_block_tools/pull/70))
|
17
|
+
|
10
18
|
## 0.12.3
|
11
19
|
|
12
20
|
- Only replace special dashes in identifiers ([69](https://github.com/alphagov/govuk_content_block_tools/pull/69))
|
data/content_block_tools.gemspec
CHANGED
@@ -28,8 +28,8 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.add_development_dependency "rake", "13.3.0"
|
29
29
|
spec.add_development_dependency "rspec", "3.13.1"
|
30
30
|
spec.add_development_dependency "rspec-html-matchers", "0.10.0"
|
31
|
-
spec.add_development_dependency "rubocop-govuk", "5.1.
|
31
|
+
spec.add_development_dependency "rubocop-govuk", "5.1.18"
|
32
32
|
|
33
33
|
spec.add_dependency "actionview", ">= 6"
|
34
|
-
spec.add_dependency "govspeak", "10.
|
34
|
+
spec.add_dependency "govspeak", "10.6.0"
|
35
35
|
end
|
@@ -4,7 +4,7 @@ module ContentBlockTools
|
|
4
4
|
module Presenters
|
5
5
|
module BlockPresenters
|
6
6
|
module Contact
|
7
|
-
class
|
7
|
+
class ContactLinkPresenter < ContentBlockTools::Presenters::BlockPresenters::BasePresenter
|
8
8
|
include ContentBlockTools::Presenters::BlockPresenters::Contact::BlockLevelContactItem
|
9
9
|
|
10
10
|
def render
|
@@ -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)
|
@@ -14,10 +14,10 @@ module ContentBlockTools
|
|
14
14
|
addresses: ContentBlockTools::Presenters::BlockPresenters::Contact::AddressPresenter,
|
15
15
|
telephones: ContentBlockTools::Presenters::BlockPresenters::Contact::TelephonePresenter,
|
16
16
|
email_addresses: ContentBlockTools::Presenters::BlockPresenters::Contact::EmailAddressPresenter,
|
17
|
-
|
17
|
+
contact_links: ContentBlockTools::Presenters::BlockPresenters::Contact::ContactLinkPresenter,
|
18
18
|
}.freeze
|
19
19
|
|
20
|
-
has_embedded_objects :addresses, :email_addresses, :telephones, :
|
20
|
+
has_embedded_objects :addresses, :email_addresses, :telephones, :contact_links
|
21
21
|
|
22
22
|
private
|
23
23
|
|
data/lib/content_block_tools.rb
CHANGED
@@ -11,7 +11,7 @@ require "content_block_tools/presenters/field_presenters/contact/email_address_p
|
|
11
11
|
|
12
12
|
require "content_block_tools/presenters/block_presenters/base_presenter"
|
13
13
|
require "content_block_tools/presenters/block_presenters/contact/address_presenter"
|
14
|
-
require "content_block_tools/presenters/block_presenters/contact/
|
14
|
+
require "content_block_tools/presenters/block_presenters/contact/contact_link_presenter"
|
15
15
|
require "content_block_tools/presenters/block_presenters/contact/email_address_presenter"
|
16
16
|
require "content_block_tools/presenters/block_presenters/contact/telephone_presenter"
|
17
17
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: content_block_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- GOV.UK Dev
|
@@ -57,14 +57,14 @@ dependencies:
|
|
57
57
|
requirements:
|
58
58
|
- - '='
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: 5.1.
|
60
|
+
version: 5.1.18
|
61
61
|
type: :development
|
62
62
|
prerelease: false
|
63
63
|
version_requirements: !ruby/object:Gem::Requirement
|
64
64
|
requirements:
|
65
65
|
- - '='
|
66
66
|
- !ruby/object:Gem::Version
|
67
|
-
version: 5.1.
|
67
|
+
version: 5.1.18
|
68
68
|
- !ruby/object:Gem::Dependency
|
69
69
|
name: actionview
|
70
70
|
requirement: !ruby/object:Gem::Requirement
|
@@ -85,14 +85,14 @@ dependencies:
|
|
85
85
|
requirements:
|
86
86
|
- - '='
|
87
87
|
- !ruby/object:Gem::Version
|
88
|
-
version: 10.
|
88
|
+
version: 10.6.0
|
89
89
|
type: :runtime
|
90
90
|
prerelease: false
|
91
91
|
version_requirements: !ruby/object:Gem::Requirement
|
92
92
|
requirements:
|
93
93
|
- - '='
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
version: 10.
|
95
|
+
version: 10.6.0
|
96
96
|
email:
|
97
97
|
- govuk-dev@digital.cabinet-office.gov.uk
|
98
98
|
executables: []
|
@@ -124,7 +124,7 @@ files:
|
|
124
124
|
- lib/content_block_tools/presenters/block_presenters/base_presenter.rb
|
125
125
|
- lib/content_block_tools/presenters/block_presenters/contact/address_presenter.rb
|
126
126
|
- lib/content_block_tools/presenters/block_presenters/contact/block_level_contact_item.rb
|
127
|
-
- lib/content_block_tools/presenters/block_presenters/contact/
|
127
|
+
- lib/content_block_tools/presenters/block_presenters/contact/contact_link_presenter.rb
|
128
128
|
- lib/content_block_tools/presenters/block_presenters/contact/email_address_presenter.rb
|
129
129
|
- lib/content_block_tools/presenters/block_presenters/contact/telephone_presenter.rb
|
130
130
|
- lib/content_block_tools/presenters/contact_presenter.rb
|