% post, content = post_and_content if local_assigns.key?(:post_and_content) %> <% muted_post = post.present? && post.to_model.content.split("\n").reject(&:empty?).all? { |paragraph| paragraph.strip.start_with?('(') && paragraph.strip.end_with?(')') } muted_post_classes = 'grey lighten-4 grey-text text-darken-2' %> <%= render 'thredded/posts_common/before_first_unread_post', post: post if post.first_unread_in_page? %> <%= content_tag :article, id: dom_id(post), class: "thredded--post thredded--#{post.read_state}--post #{muted_post ? muted_post_classes : 'card'}" do %> <%= render 'thredded/posts_common/actions', post: post, actions: local_assigns[:actions] %> <%= render 'thredded/posts_common/header', post: post %> <%= content || render('thredded/posts/content', post: post) %> <% if post.pending_moderation? && !Thredded.content_visible_while_pending_moderation %>
<%= t 'thredded.posts.pending_moderation_notice' %>
<% elsif post.blocked? && post.can_moderate? %><%= render 'thredded/shared/content_moderation_blocked_state', moderation_record: post.last_moderation_record %>
<% end %> <% end %>