From 18e9e6cd4bd3a15e34a2f2ba78c5683ef710eec6 Mon Sep 17 00:00:00 2001
From: pabois <pierreandre.boissinot@noesya.coop>
Date: Tue, 19 Apr 2022 16:37:50 +0200
Subject: [PATCH] notes on block chapter

---
 app/models/communication/block/template/chapter.rb            | 4 ++++
 .../communication/blocks/templates/chapter/_show.html.erb     | 1 +
 .../communication/blocks/templates/chapter/_static.html.erb   | 2 ++
 3 files changed, 7 insertions(+)

diff --git a/app/models/communication/block/template/chapter.rb b/app/models/communication/block/template/chapter.rb
index 971c787ef..e51d09966 100644
--- a/app/models/communication/block/template/chapter.rb
+++ b/app/models/communication/block/template/chapter.rb
@@ -6,4 +6,8 @@ class Communication::Block::Template::Chapter < Communication::Block::Template
   def text
     "#{data['text']}"
   end
+
+  def notes
+    "#{data['notes']}"
+  end
 end
diff --git a/app/views/admin/communication/blocks/templates/chapter/_show.html.erb b/app/views/admin/communication/blocks/templates/chapter/_show.html.erb
index 57a0e4c3b..868577d6e 100644
--- a/app/views/admin/communication/blocks/templates/chapter/_show.html.erb
+++ b/app/views/admin/communication/blocks/templates/chapter/_show.html.erb
@@ -1 +1,2 @@
 <%= @block.template.text.html_safe %>
+<%= @block.template.notes.html_safe %>
diff --git a/app/views/admin/communication/blocks/templates/chapter/_static.html.erb b/app/views/admin/communication/blocks/templates/chapter/_static.html.erb
index fe07289fb..1dcbc9218 100644
--- a/app/views/admin/communication/blocks/templates/chapter/_static.html.erb
+++ b/app/views/admin/communication/blocks/templates/chapter/_static.html.erb
@@ -1,2 +1,4 @@
       text: >-
         <%= prepare_html_for_static block.template.text, about.university %>
+      notes: >-
+        <%= prepare_html_for_static block.template.notes, about.university %>
-- 
GitLab