Shared page
<% if @share.content_page %>
<%= link_to @share.content_page do %> <%= image_tag @share.content_page.first_public_image %> <%= @share.content_page.class.icon %> <%= @share.content_page.name %> <% end %>
<% else %>
The shared page has been removed.
<% end %>

Created by
<%= link_to @share.user do %>
<%= User.icon %> <%= @share.user.display_name %>
<%= render partial: 'thredded/users/badge', locals: { user: @share.user } %>
<% end %>
  • Share Actions
  • <% if @share.followed_by?(current_user) %> <%= link_to 'Unfollow this share', unfollow_user_content_page_share_path(user_id: @share.user.id, id: @share.id) %> <% else %> <%= link_to 'Follow this share', follow_user_content_page_share_path(user_id: @share.user.id, id: @share.id) %> <% end %>
  • <% if @share.user == current_user %>
  • <%= link_to user_content_page_share_path(user_id: @share.user.id, id: @share.id), method: :DELETE, data: { confirm: "Are you sure? This will delete this share and any comments that have been posted to it!" } do %> Delete this share <% end %>
  • <% else %>
  • <%= link_to report_user_content_page_share_path(user_id: @share.user.id, id: @share.id) do %> Report this share <% end %>
  • <% end %>
  • <%= link_to 'Back to your stream', main_app.stream_path %>
  • Reshare to...
  • <%= link_to [ 'http://twitter.com/share?', 'url=' + CGI.escape(user_content_page_share_url(user_id: @share.user.id, id: @share.id)), '&text=' + CGI.escape(@share.message) ].join, class: 'blue-text', target: '_blank' do %> share Twitter <% end %>
  • <%= link_to "https://www.facebook.com/sharer/sharer.php?app_id=1523926344336934&u=#{CGI.escape(user_content_page_share_url(user_id: @share.user.id, id: @share.id))}&display=popup&ref=plugin&src=share_button", class: 'blue-text', onclick: "return !window.open(this.href, 'Facebook', 'width=640,height=580')" do %> share Facebook <% end %>

<%= link_to @share.user, class: "#{User.text_color}" do %> <%= image_tag @share.user.image_url(size=20), class: 'left circle avatar' %> <%= @share.user.name %> <% end %> said: <%= time_ago_in_words @share.shared_at %> ago

<% if @share.message.present? %>
<%= simple_format ContentFormatterService.show( text: @share.message, viewing_user: current_user ) %>
<% 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 %>