Skip to content
Snippets Groups Projects
Unverified Commit 79ed66c0 authored by Sébastien Gaya's avatar Sébastien Gaya
Browse files

#385 : header_text

parent 9ce9144e
No related branches found
No related tags found
No related merge requests found
......@@ -12,11 +12,7 @@
<%= f.input :title %>
<%= f.input :breadcrumb_title %>
<%= f.input :description_short, input_html: { value: page.description_short&.gsub('&amp;', '&') } %>
<%= f.input :header_text,
as: :summernote,
input_html: {
data: { 'summernote-config' => 'mini' }
} %>
<%= f.input :header_text, as: :string %>
<%= f.input :text, as: :summernote if page.text&.to_plain_text.present? %>
<%= f.association :related_category,
collection: collection_tree(@website.categories),
......
......@@ -19,8 +19,8 @@ description: >
<%= prepare_text_for_static @about.description %>
description_short: >
<%= prepare_text_for_static @about.description_short %>
header_text: >
<%= prepare_html_for_static @about.header_text, @website.university %>
header_text: >-
<%= @about.header_text %>
legacy_text: >
<%= prepare_html_for_static @about.text, @about.university %>
<%= render 'admin/communication/blocks/static', about: @about %>
......
......@@ -12,6 +12,11 @@ namespace :app do
person.is_author = person.communication_website_posts.any?
person.save
end
Communication::Website::Page.where("header_text ILIKE ?", "%<p>%").find_each { |page|
clean_header_text = ActionController::Base.helpers.strip_tags(page.header_text)
page.update(header_text: clean_header_text)
}
end
namespace :websites do
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment