<% end %>
<% if defined?(single_story) && single_story %>
<% story.merged_stories.each do |ms| %>
<% end %>
<% end %>
<% end %>
<% if !(defined?(single_story) && single_story) && @user &&
@user.show_story_previews? %>
<% if (sc = story.description_or_story_cache(500)).present? %>
<% if @user && @user.show_avatars? %>
<% end %>
<% if story.user_is_author? %>
authored
<% end %>
<% if story.previewing %>
by
<%=
story.user.username %>
just now
<% else %>
by
<%= story.user.username %>
<%= time_ago_in_words_label(story.created_at, :strip_about => true) %>
<% if story.is_editable_by_user?(@user) %>
|
edit
<% if story.is_gone? && story.is_undeletable_by_user?(@user) %>
|
<%= link_to "undelete", story_undelete_path(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_path(story.short_id),
:method => :delete, :class => "mod_story_link" %>
<% else %>
<%= link_to "delete", story_path(story.short_id),
:method => :delete, :data => {
:confirm => "Are you sure you want to delete this story?" } %>
<% end %>
<% end %>
<% elsif story.can_have_suggestions_from_user?(@user) %>
| <%= link_to "suggest", story_suggest_path(story.short_id),
:class => "suggester" %>
<% end %>
<% if !story.is_gone? && @user %>
<% if @user && story.vote && story.vote[:vote] == -1 %>
|
unflag (<%=
Vote::STORY_REASONS[story.vote[:reason]].to_s.downcase %>)
<% elsif @user && @user.can_downvote?(story) %>
|
flag
<% end %>
<% if story.is_hidden_by_cur_user %>
| <%= link_to "unhide", story_unhide_path(story.short_id),
:class => "hider" %>
<% else %>
| <%= link_to "hide", story_hide_path(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 &&
((story.downvotes > 0 && @user && @user.is_moderator?) ||
(story.downvotes >= 3 || story.score <= 0)) %>
| <%= story.vote_summary_for(@user).downcase %>
<% end %>
<% end %>