diff --git a/app/models/communication/block/template/contact.rb b/app/models/communication/block/template/contact.rb index b298da6c9c4c4159e26efd0e3dddce754f1e76d9..4ddd562dd364aa1bf7c343c2058d87d427b20253 100644 --- a/app/models/communication/block/template/contact.rb +++ b/app/models/communication/block/template/contact.rb @@ -1,5 +1,6 @@ class Communication::Block::Template::Contact < Communication::Block::Template::Base + has_component :description, :rich_text has_component :name, :string has_component :address, :text has_component :zipcode, :string diff --git a/app/views/admin/communication/blocks/templates/contact/_edit.html.erb b/app/views/admin/communication/blocks/templates/contact/_edit.html.erb index f9ae11e84ec18cf90b5f854cbd8b933fd0616c5c..0da97e4049eba2b564c6c931cd28faeff8039dad 100644 --- a/app/views/admin/communication/blocks/templates/contact/_edit.html.erb +++ b/app/views/admin/communication/blocks/templates/contact/_edit.html.erb @@ -1,3 +1,8 @@ +<div class="row"> + <div class="col-xl-6"> + <%= block_component_edit :description %> + </div> +</div> <div class="row mb-4"> <div class="col-md-6 col-xl-4"> <div class="card"> diff --git a/app/views/admin/communication/blocks/templates/contact/_preview.html.erb b/app/views/admin/communication/blocks/templates/contact/_preview.html.erb index 5bb7098c4043c472eaaefca465e67b89db52abd2..579b9f6d22b5581c9ab0d68d43c9711a4076d050 100644 --- a/app/views/admin/communication/blocks/templates/contact/_preview.html.erb +++ b/app/views/admin/communication/blocks/templates/contact/_preview.html.erb @@ -1,3 +1,4 @@ +<%= block_component_preview :description %> <p> <%= block_component_preview :name %><br> <% if @block.template.address.present? %> diff --git a/app/views/admin/communication/blocks/templates/contact/_static.html.erb b/app/views/admin/communication/blocks/templates/contact/_static.html.erb index 3e9f43997f0abfffa60892172b0fcde4acdda665..16c95afe197a835858b7c865e9bfc85c1c68f305 100644 --- a/app/views/admin/communication/blocks/templates/contact/_static.html.erb +++ b/app/views/admin/communication/blocks/templates/contact/_static.html.erb @@ -1,3 +1,4 @@ +<%= block_component_static :description %> <%= block_component_static :name %> address: <%= block_component_static :address, depth: 4 %> diff --git a/config/locales/communication/en.yml b/config/locales/communication/en.yml index 43f86bae1fca1f2a794e6a55bc662262e88e97e2..b4f03422224b7a22a19f1f28131dd6bd691206c5 100644 --- a/config/locales/communication/en.yml +++ b/config/locales/communication/en.yml @@ -210,6 +210,9 @@ en: country: label: Country placeholder: Enter the country + description: + label: Description + placeholder: Enter description here element: title: label: Day diff --git a/config/locales/communication/fr.yml b/config/locales/communication/fr.yml index 29a758f331e22bbcec281fbe53fa58dc4aebabb2..171268b0657ab43b04a76ae2e6892f94913fa89b 100644 --- a/config/locales/communication/fr.yml +++ b/config/locales/communication/fr.yml @@ -210,6 +210,9 @@ fr: country: label: Pays placeholder: Entrer le nom du pays + description: + label: Description + placeholder: Entrer la description element: title: label: Jour