<% if @user %>
<% else %>
<%= link_to "", login_path, :class => "upvoter" %>
<% end %>
<%= story.score %>
<% if story.can_be_seen_by_user?(@user) %>
<%= story.title %>
<% end %>
<% if story.is_gone? %>
[Story removed by <%= story.is_moderated? ? "moderator" :
"original submitter" %>]
<% end %>
<% if story.can_be_seen_by_user?(@user) %>
<% story.sorted_taggings.each do |tagging| %>
<%= tagging.tag.tag %>
<% end %>
<% if story.domain.present? %>
<%=
story.domain %>
<% end %>
<% if defined?(single_story) && single_story %>
<% story.merged_stories.each do |ms| %>
<%= ms.title %>
<% ms.sorted_taggings.each do |tagging| %>
<%= tagging.tag.tag %>
<% end %>
<% if ms.domain.present? %>
<%=
ms.domain %>
<% end %>
by
class="new_user"
<% end %>><%= ms.user.username %>
<%= time_ago_in_words_label(ms.created_at, :strip_about => true) %>
ago
<% end %>
<% end %>
<% end %>
<% if story.previewing %>
by
<%= story.user.username %>
just now
<% else %>
by
class="new_user"
<% end %>><%= story.user.username %>
<%= time_ago_in_words_label(story.created_at, :strip_about => true) %>
ago
<% 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 %>
<% end %>
<% if !story.is_gone? && @user %>
<% if @user && @user.can_downvote?(story) %>
|
flag
<% end %>
<% if story.vote == 0 %>
| <%= 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 %>
<% if story.downvotes > 0 %>
| <%= story.vote_summary_for(@user).downcase %>
<% end %>
<% end %>
<% end %>