<% if share.content_page.present? %> <% if Rails.application.config.content_types[:all].map(&:name).include?(share.content_page_type) %> <%= render partial: 'content_page_shares/stream_page_share', locals: { share: share, content: share.content_page } %> <% elsif share.content_page_type == Thredded::Topic.name %> <%= render partial: 'content_page_shares/stream_discussion', locals: { share: share, content: share.content_page } %> <% elsif share.content_page_type == PageCollection.name %> <% if share.secondary_content_page.present? %> <%= render partial: 'content_page_shares/stream_added_to_page_collection', locals: { share: share, content: share.content_page, secondary_content: share.secondary_content_page } %> <% else %> <%= render partial: 'content_page_shares/stream_new_page_collection', locals: { share: share, content: share.content_page } %> <% end %> <% elsif share.content_page_type == Document.name %> <%= render partial: 'content_page_shares/stream_document_share', locals: { share: share, content: share.content_page } %> <% elsif share.content_page_type == Timeline.name %> <%= render partial: 'content_page_shares/stream_timeline_share', locals: { share: share, content: share.content_page } %> <% else %> Error loading stream item <% end %>

 

<% end %>