<% 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?) || !@user %>
<%=
avatar_img(story.user, 16) %>
<% end %>
<% if story.previewing %>
<% if story.user_is_author? %>
<%= t('.authoredby') %>
<% else %>
<%= t('.via') %>
<% end %>
<%=
story.user.username %>
<%= t('.justnow') %>
<% else %>
<% if story.user_is_author? %>
<%= t('.authoredby') %>
<% else %>
<%= t('.via') %>
<% end %>
<%= story.user.username %>
<%= distance_of_time_in_words(story.created_at, Time.now, :strip_about => true) %>
<% if story.is_editable_by_user?(@user) %>
|
"><%= t('.edit') %>
<% if story.is_gone? && story.is_undeletable_by_user?(@user) %>
|
<%= link_to t('.undelete'), story_undelete_path(story.short_id),
:method => :post, :data => {
:confirm => t('.confirmundelete') } %>
<% elsif !story.is_gone? %>
|
<% if story.user_id != @user.try(:id) &&
@user.try(:is_moderator?) %>
<%= link_to t('.delete'), story_path(story.short_id),
:method => :delete, :class => "mod_story_link" %>
<% else %>
<%= link_to t('.delete'), story_path(story.short_id),
:method => :delete, :data => {
:confirm => t('.confirmdelete') } %>
<% end %>
<% end %>
<% end %>
<% if story.can_have_suggestions_from_user?(@user) %>
| <%= link_to t('.suggest'), story_suggest_path(story.short_id),
:class => "suggester" %>
<% end %>
<% if !story.is_gone? && @user %>
<% if @user && story.vote && story.vote[:vote] == -1 %>
|
<%= t('.unflag') %> (<%=
Vote::STORY_REASONS[story.vote[:reason]].to_s.downcase %>)
<% elsif @user && @user.can_downvote?(story) %>
|
<%= t('.flag') %>
<% end %>
<% if story.is_hidden_by_cur_user %>
| <%= link_to t('.unhide'), story_unhide_path(story.short_id),
:class => "hider" %>
<% else %>
| <%= link_to t('.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.url.present? %>
|
<%= t('.cached') %>
<% end %>
<% if !story.is_gone? %>
<% 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 %>