<% if share.user == content.user %>
<%= link_to [share.user, share] do %>
<%= image_tag secondary_content.first_public_image %>
<% end %>
<% else %>
<%= link_to [share.user, share] do %>
<%= image_tag content.first_public_image %>
<% end %>
<% end %>
<% if share.user_id == content.user_id %>
<%# if this is a share for adding content you own to your own collection, show the content instead of the collection %>
<%= link_to secondary_content do %>
<%= secondary_content.class.icon %>
<%= secondary_content.name %>
<% end %>
<% else %>
<%= link_to content do %>
<%= content.class.icon %>
<%= content.title %>
<% end %>
<% end %>
<%= simple_format share.message %><% end %> <%= render partial: 'share_comments/form', locals: { share: share } %>
<%= pluralize share.share_comments.count, 'comment' %>
<% share.share_comments.each do |comment| %>
<%= render partial: 'share_comments/show', locals: { comment: comment, share: share } %>
<% end %>
<% if share.share_comments.count > 10 %>
<%= render partial: 'share_comments/form', locals: { share: share } %>
<% end %>