diff --git a/app/views/admin/communication/website/pages/_form.html.erb b/app/views/admin/communication/website/pages/_form.html.erb index fe48a44effb1f674351a236dc7fe8d965158848f..ebbb2feadcfb269e22a88760749e8823e832f353 100644 --- a/app/views/admin/communication/website/pages/_form.html.erb +++ b/app/views/admin/communication/website/pages/_form.html.erb @@ -17,7 +17,7 @@ input_html: { data: { 'summernote-config' => 'mini' } } %> - <%= f.input :text, as: :summernote %> + <%= f.input :text, as: :summernote if page.text&.to_plain_text.present? %> <%= f.association :related_category, collection: collection_tree(@website.categories), label_method: ->(p) { sanitize p[:label] }, diff --git a/app/views/admin/communication/website/pages/show.html.erb b/app/views/admin/communication/website/pages/show.html.erb index c9de26166a1876c6cc903232e370c3e59b8f7bbe..c8f5773399a9b98cad09e4fec5cc5c75e7cb8395 100644 --- a/app/views/admin/communication/website/pages/show.html.erb +++ b/app/views/admin/communication/website/pages/show.html.erb @@ -20,7 +20,7 @@ </div> <div class="card-body"> <%= render 'admin/application/property/text', object: @page, property: :description_short %> - <%= render 'admin/application/property/text', object: @page, property: :text %> + <%= render 'admin/application/property/text', object: @page, property: :text if @page.text&.to_plain_text.present? %> </div> </div> <%= render 'admin/communication/blocks/list', about: @page %>