From b37e1ca31a5ea1014371de3f68c7737f05a662ea Mon Sep 17 00:00:00 2001 From: takahashim Date: Thu, 21 Sep 2023 11:59:13 +0900 Subject: [PATCH] Update a view file of blogs#show --- app/views/decidim/blogs/posts/show.html.erb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/views/decidim/blogs/posts/show.html.erb b/app/views/decidim/blogs/posts/show.html.erb index 6dbcb9423..1d5831dc8 100644 --- a/app/views/decidim/blogs/posts/show.html.erb +++ b/app/views/decidim/blogs/posts/show.html.erb @@ -5,6 +5,7 @@ description: translated_attribute(post.body).truncate(Rails.application.config.default_blog_ogp_description_limit), url: post_url(post.id) }) %> + <% doc = Nokogiri::HTML(translated_attribute(post.body)) img = doc.css('img')&.first @@ -27,7 +28,9 @@ <% end %>

<%= translated_attribute post.title %>

- <%= cell "decidim/author", present(post.author), from: post %> + + <% post_presenter = Decidim::Blogs::PostPresenter.new(post) %> + <%= cell "decidim/author", post_presenter.author, from: post %>
<% if show_endorsements_card? %> @@ -54,10 +57,11 @@ <% end %>
">
- <%= decidim_sanitize_editor translated_attribute post.body %> + <%= decidim_sanitize_editor_admin translated_attribute(post.body) %>
<%= cell "decidim/endorsers_list", post %>
<%= attachments_for post %> <%= comments_for post %> +<%= cell("decidim/flag_modal", post) %>