<%= render partial: 'content_page_shares/action_dropdown', locals: { share: share, content: content } %> <%= link_to share.user, class: "#{User.text_color}" do %> <%= image_tag share.user.image_url(size=20), class: 'left circle avatar' %> <%= share.user.display_name %> <% end %> <% if share.user == content.user %> added a <%= share.secondary_content_page.class.name.downcase %> to their <% else %> got accepted into the <% end %> <%= link_to content.title, content, class: "#{content.class.text_color} text-darken-1" %> Collection! <%= link_to [share.user, share], class: 'grey-text' do %> <%= time_ago_in_words share.created_at %> ago <% end %>
<% 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 %>
<% if share.message.present? %>
<%= 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 %>