<% @comments.each_with_index  do |comment,i| %>
    <script type="text/javascript">
        $(function(){
            showNormalImage('reply_message_description_<%= comment.id %>');
            autoUrl('reply_message_description_<%= comment.id %>');
        });
    </script>
    <li class="homepagePostReplyContainer" nhname="reply_rec">
      <div class="homepagePostReplyPortrait">
        <%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user.id) %>
      </div>
      <div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=comment.id %>').show();" onmouseout="$('#delete_reply_<%=comment.id %>').hide();">
        <%= render :partial => 'users/news_contents', :locals => {:comment => comment}%>

        <% if !comment.content_detail.blank? %>
            <div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
              <%= comment.content_detail.html_safe %>
            </div>
            <div class="orig_reply mb10 mt-10">
              <div class="reply">
                <span class="reply-right">
                    <span id="reply_praise_count_<%=comment.id %>">
                      <%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
                    </span>
                    <span style="position: relative" class="fr mr20">
                        <%= link_to(
                                    l(:button_reply),
                                    {:controller => 'comments',:action => 'quote', :id => comment},
                                    :remote => true,
                                    :method => 'get',
                                    :title => l(:button_reply))%>
                      <span id="reply_iconup_<%= comment.id %>" class="reply_iconup02" style="display: none"> ︿</span>
                    </span>
                  <%= link_to(
                              l(:button_delete),
                              {:controller => 'comments',
                               :action => 'destroy', :id => @news,
                               :comment_id => comment},
                              :method => :delete,
                              :id => "delete_reply_#{comment.id}",
                              :class => 'fr mr20 undis',
                              :data => {:confirm => l(:text_are_you_sure)},
                              :title => l(:button_delete)
                      ) if ((object.kind_of? Organization) ? User.current.allowed_to?(:manage_news, object) : (User.current.admin_of_org?(object) || User.current == comment.author)) %>
                        </span>
                <div class="cl"></div>
              </div>
            </div>
            <p id="reply_message_<%= comment.id%>"></p>
        <% end %>
      </div>
      <div class="cl"></div>
    </li>
<% end %>
<% if @comments_count > @page * @limit + 10 %>
    <div id="more_news_replies">
      <div class="detail_cont_hide clearfix">
        <span class="orig_icon" >&darr; </span>
        <span class="orig_icon" style="display:none;" > &uarr;</span>
        <%= link_to '点击展开更多回复', news_path(@news, :page => @page), :remote=>true %>
      </div>
    </div>
<% end %>