<%= story.is_expired? ? "expired" : "" %>">
<% if @user %>
<% else %>
<%= link_to "", login_url, :class => "upvoter" %>
<% end %>
<%= story.upvotes - story.downvotes %>
<% if @user %>
<% else %>
<%= link_to "", login_url, :class => "downvoter" %>
<% end %>
<% 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.taggings.sort_by{|t| t.tag.tag }.sort_by{|t|
t.tag.tag == "pdf" ? -1 : 0 }.each do |tagging| %>
<%= tagging.tag.tag %>
<% end %>
<%= story.domain %>
<% end %>
<% if story.previewing %>
by
<%= story.user.username %>
just now
<% else %>
by
<%= story.user.username
%> <%= time_ago_in_words(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? %>
|
<%= link_to "delete", story_url(story.short_id),
:method => :delete, :data => {
:confirm => "Are you sure you want to delete this story?" } %>
<% end %>
<% end %>
<% if !story.is_gone? %>
|
<%=
(c = story.comment_count) == 0 ? "discuss" :
"#{c} comment#{c == 1 ? "" : "s"}" %>
<% end %>
<% end %>