<ul class="related-content-list" id="related-content-list">
  <% related_contents.compact.each do |related| %>
    <% related_content = related.find_related_content(relationable) %>

    <li id="related-content-<%= related_content.id %>">
      <div>
        <span class="related-content-title"><%= t("related_content.content_title.#{related.model_name.singular}") %></span><br>
        <h3 class="inline-block">
          <%= link_to related.title, polymorphic_path(related) %>
        </h3>
      </div>
      <% if current_user && related_content.author != current_user && !related_content.scored_by_user?(current_user) %>
        <span id="<%= dom_id(related_content) %>" class="js-score-actions score-actions">
          <%= render "relationable/score", related: related_content %>
        </span>
      <% end %>
    </li>
  <% end %>
</ul>

<%= paginate related_contents %>
