<% if (CurrentUser.can_approve_posts? || post.created_at < Danbooru.config.moderation_period.ago) && disapprovals.length > 0 %>
  <% if disapprovals.map(&:reason).grep("breaks_rules").count > 0 %>
    (breaks rules: <%= disapprovals.map(&:reason).grep("breaks_rules").count %>)
  <% end %>

  <% if disapprovals.map(&:reason).grep("poor_quality").count > 0 %>
    (poor quality: <%= disapprovals.map(&:reason).grep("poor_quality").count %>)
  <% end %>

  <% if disapprovals.map(&:reason).grep(/disinterest|legacy/).count > 0 %>
    (no interest: <%= disapprovals.map(&:reason).grep(/disinterest|legacy/).count %>)
  <% end %>

  <% if disapprovals.map(&:message).any?(&:present?) %>
    (messages: <%= disapprovals.map(&:message).select(&:present?).map { |msg| format_text(msg, inline: true) }.to_sentence.html_safe %>)
  <% end %>
<% end %>
