<% if defined?(single_story) && single_story %>
<% story.merged_stories.each do |ms| %>
<% if story.previewing %>
by
<%= story.user.username %>
just now
<% else %>
by
<%= story.user.username
%> <%= raw(time_ago_in_words_label(story.created_at).
gsub(/^about /, "")) %> ago
<% if story.is_editable_by_user?(@user) %>
|
edit
<% if story.is_gone? && story.is_undeletable_by_user?(@user) %>
|
<%= link_to "undelete", story_undelete_url(story.short_id),
:method => :post, :data => {
:confirm => "Are you sure you want to undelete this story?" } %>
<% elsif !story.is_gone? %>
|
<% if story.user_id != @user.try(:id) &&
@user.try(:is_moderator?) %>
<%= link_to "delete", story_url(story.short_id),
:method => :delete, :class => "mod_story_link" %>
<% else %>
<%= link_to "delete", story_url(story.short_id),
:method => :delete, :data => {
:confirm => "Are you sure you want to delete this story?" } %>
<% end %>
<% end %>
<% end %>
<% if !story.is_gone? && @user %>
<% if @user && @user.can_downvote?(story) %>
|
flag
<% end %>
<% if story.vote == 0 %>
| <%= link_to "unhide", story_unhide_url(story.short_id),
:class => "hider" %>
<% else %>
| <%= link_to "hide", story_hide_url(story.short_id),
:class => "hider" %>
<% end %>
<% if defined?(single_story) && single_story && story.hider_count > 0 %>
(hidden by <%= pluralize(story.hider_count, "user") %>)
<% end %>
<% end %>
<% if !story.is_gone? && (@user || story.comments_count > 0) %>
<% end %>
<% if defined?(single_story) && single_story %>
<% if story.downvotes > 0 %>
| <%= story.vote_summary_for(@user).downcase %>
<% end %>
<% end %>
<% end %>