Sha256: f26026d268ad8a438a21e44622ca4d37e7629ed745bd871344b334bd77da52d3

Contents?: true

Size: 1.95 KB

Versions: 47

Compression:

Stored size: 1.95 KB

Contents

<%
  record = post_moderation_record
  post = record.post
  if post
    post_view = Thredded::PostView.new(post, policy(post))
  end
  moderation_state_notice_args = {
      moderator: user_link(record.moderator),
      time_ago:  time_ago(record.created_at)
  }
%>
<article class="thredded--post-moderation-record thredded--post-moderation-record-<%= record.moderation_state %>">
  <header class="thredded--post-moderation-record--header">
    <p class="thredded--post-moderation-record--moderation-state-notice">
      <% if record.approved? %>
        <%= t('thredded.moderation.post_approved_html', moderation_state_notice_args) %>
      <% elsif record.blocked? %>
        <%= t('thredded.moderation.post_blocked_html', moderation_state_notice_args) %>
      <% end %>
    </p>
    <% if post && post.content != record.post_content %>
      <p class="thredded--post-moderation-record--content-changed-notice">
        <%= t('thredded.moderation.posts_content_changed_since_moderation_html', post_url: post_permalink_path(post)) %>
      </p>
    <% end %>
    <%= content_tag :em, t('thredded.moderation.post_deleted_notice') unless post %>
  </header>
  <article class="thredded--post">
    <% post_user_link = capture do %>
      <% if record.post_user %>
        <%= link_to record.post_user.thredded_display_name, user_moderation_path(record.post_user.id) %>
      <% else %>
        <%= safe_join [record.post_user_name, content_tag(:em, t('thredded.null_user_name'))].compact, ', ' %>
      <% end %>
    <% end %>
    <% if post %>
      <%= render 'thredded/posts_common/header_with_user_and_topic', post: post_view, post_user_link: post_user_link %>
    <% else %>
      <header><h2 class="thredded--post--user"><%= post_user_link %></h2></header>
    <% end %>
    <div class="thredded--post--content">
      <%= Thredded::ContentFormatter.new(self).format_content(record.post_content) %>
    </div>
  </article>
  <%= render 'post_moderation_actions', post: post if post %>
</article>

Version data entries

47 entries across 47 versions & 2 rubygems

Version Path
thredded-0.16.11 app/views/thredded/moderation/_post_moderation_record.html.erb
thredded-0.16.10 app/views/thredded/moderation/_post_moderation_record.html.erb
thredded-0.16.9 app/views/thredded/moderation/_post_moderation_record.html.erb
thredded-0.16.8 app/views/thredded/moderation/_post_moderation_record.html.erb
thredded-0.16.7 app/views/thredded/moderation/_post_moderation_record.html.erb
thredded-0.16.6 app/views/thredded/moderation/_post_moderation_record.html.erb
thredded-0.16.5 app/views/thredded/moderation/_post_moderation_record.html.erb
thredded-0.16.4 app/views/thredded/moderation/_post_moderation_record.html.erb
thredded-0.16.3 app/views/thredded/moderation/_post_moderation_record.html.erb
thredded-0.16.1 app/views/thredded/moderation/_post_moderation_record.html.erb
thredded-0.16.0 app/views/thredded/moderation/_post_moderation_record.html.erb
thredded-0.15.5 app/views/thredded/moderation/_post_moderation_record.html.erb
thredded-0.15.4 app/views/thredded/moderation/_post_moderation_record.html.erb
thredded-0.15.3 app/views/thredded/moderation/_post_moderation_record.html.erb
thredded-0.15.2 app/views/thredded/moderation/_post_moderation_record.html.erb
thredded-0.15.1 app/views/thredded/moderation/_post_moderation_record.html.erb
threddedDANIEL-0.14.5 app/views/thredded/moderation/_post_moderation_record.html.erb
thredded-0.14.4 app/views/thredded/moderation/_post_moderation_record.html.erb
thredded-0.14.3 app/views/thredded/moderation/_post_moderation_record.html.erb
thredded-0.14.2 app/views/thredded/moderation/_post_moderation_record.html.erb