<% if @user && @user.is_moderator? && @story.is_gone? %>
  <%= render partial: 'stories/missing' %>
  <hr class="mod">
  <p>Full display for submitter and mods:</p>
<% end %>
<ol class="stories">
  <%= render :partial => "stories/listdetail",
    :locals => { :story => @story, :single_story => true } %>
</ol>

<div class="story_content">
  <% if @story.markeddown_description.present? %>
    <div class="story_text">
      <%= raw @story.markeddown_description %>
    </div>
  <% end %>

  <% if @story.is_unavailable %>
    <% StoryText.cached?(@story) do |text| %>
      <a class="story_text_expander">Source URL considered unavailable as of
      <%= time_ago_in_words_label(@story.unavailable_at) %>, click for cached text - also see archive links above</a>
      <div id="collapsed_story_text">
        <p>
        <em>All story content copyright of its respective owner.</em>
        </p>

        <div class="story_text">
          <blockquote>
            <%= simple_format(text) %>
          </blockquote>
        </div>
      </div>

    <% end %>
  <% end %>
</div>

<% if !@story.previewing %>
  <ol class="comments comments1">
    <% if !@story.is_gone? && !@story.previewing && @story.accepting_comments? %>
      <li class="comments_subtree"><%= render "comments/commentbox", :comment => @comment %></li>
    <% end %>

    <li class="comments_subtree">
      <%= render partial: 'comments/threads', locals: { thread: @comments, story: @story } %>
    </li>

  </ol>
<% end %>

<% if !@story.previewing && @story.public_similar_stories(@user).length > 0 %>
  <div class="box wide">
    <h4>Stories with similar links:</h4>
    <%= render partial: "stories/similar", locals: { similar: @story.public_similar_stories(@user) } %>
  </div>
<% end %>
