<%= render partial: 'messages/subnav' %>

<%= render partial: 'users/flag_warning' if @show_flag_warning %>

<% if @replies.present? %>
  <ol class="comments comments1">
    <% @replies.each do |reply| %>
      <li class="comments_subtree">
        <%= render "comments/comment",
            comment: reply.comment,
            show_story: true,
            is_unread: reply.is_unread,
            show_tree_lines: false %>
        <ol class="comments"></ol>
      </li>
    <% end %>
  </ol>
<% else %>
  <p class="help">No replies to show.</p>
<% end %>

<% if @replies.length > RepliesController::REPLIES_PER_PAGE && @filter != 'unread'%>
<div class="morelink">
  <% if @page && @page > 1 %>
    <a href="/replies<%= @page == 2 ? "" : "/page/#{@page - 1}" %>">&lt;&lt;
      Page <%= @page - 1 %></a>
  <% end %>

  <% if @replies.any? %>
    <% if @page && @page > 1 %>
      |
    <% end %>

    <a href="/replies/page/<%= @page + 1 %>">Page
      <%= @page + 1 %> &gt;&gt;</a>
  <% end %>
</div>
<% end %>

<div class="help">
  <% case action_name
     when "all" %>
    All replies to your stories and comments, most-recent first.
  <% when "comments" %>
    All replies to your comments, most-recent first.
  <% when "unread" %>
    New replies to your stories and comments that you haven't seen on this page or on story pages.
  <% when "stories" %>
    All replies to stories you've submitted, most-recent first.
  <% end %>
</div>
