diff --git a/app/views/admin/application/property/_text.html.erb b/app/views/admin/application/property/_text.html.erb index 42e023087a32681dcda45950a6ee4e6825d0d63b..fa38997953ae6cf3e8afac22a04bc9faec3c06d6 100644 --- a/app/views/admin/application/property/_text.html.erb +++ b/app/views/admin/application/property/_text.html.erb @@ -4,6 +4,7 @@ if object.respond_to? "best_#{property}" value = object.public_send("best_#{property}").to_s source = object.public_send("best_#{property}_source") end +text = Static.html_to_text value %> <h3 class="h5"> <%= object.class.human_attribute_name(property) %> @@ -15,7 +16,7 @@ end <% end %> </h3> <p> - <% if value.blank? %> + <% if text.blank? %> <i class="fa fa-exclamation-circle text-danger"></i> <%= t 'properties.text.missing' %> <% else %> diff --git a/app/views/admin/education/programs/show.html.erb b/app/views/admin/education/programs/show.html.erb index 8fd6930ba8e3327de6efbc3149934244b4ca3a03..76a157351eb1ba31f78bd6ff375e7ccecfcb51a8 100644 --- a/app/views/admin/education/programs/show.html.erb +++ b/app/views/admin/education/programs/show.html.erb @@ -62,10 +62,7 @@ <%= render 'admin/education/programs/forms/part', part: :presentation, collapsed: true do %> <div class="row"> <div class="col-xxl-6"> - <h3 class="h5"> - <%= Education::Program.human_attribute_name('presentation') %> - </h3> - <p><%= @program.presentation %></p> + <%= render 'admin/application/property/text', object: @program, property: :presentation %> </div> <div class="col-xxl-6"> <%= render 'admin/application/property/text', object: @program, property: :objectives %> diff --git a/config/locales/education/fr.yml b/config/locales/education/fr.yml index 77e0483a0c33e463c9d4c6c6a129fee08f808753..bc51c0384bbfbf77f7fa51eacd092bced4019b84 100644 --- a/config/locales/education/fr.yml +++ b/config/locales/education/fr.yml @@ -101,7 +101,7 @@ fr: hint: Haut de page, résumé de la formation. presentation: label: Présentation - hint: Complétées par les blocs, afin de permettre une présentation libre et riche de la formation. + hint: Complétée par les blocs, afin de permettre un descriptif libre et riche de la formation. pedagogy: label: Pédagogie hint: Mode d'enseignement et d'évaluation, et présentation de l'équipe pédagogique.