2016-07-21 10:30:48 +08:00
|
|
|
<div class="homepagePostReplyPublisher">
|
2016-11-11 13:55:38 +08:00
|
|
|
<%= link_to comment.creator_user.show_name, user_url_in_org(comment.creator_user), :class => "newsBlue mr10 f14" %>
|
2016-07-21 10:30:48 +08:00
|
|
|
<%= time_from_now(comment.respond_to?(:created_on) ? comment.created_on : comment.created_at) %>
|
|
|
|
</div>
|
|
|
|
<% if !comment.parent.nil? %>
|
|
|
|
<% parents_rely = [] %>
|
|
|
|
<% parents_rely = get_reply_parents parents_rely, comment %>
|
|
|
|
<% length = parents_rely.length %>
|
|
|
|
<div id="comment_reply_<%=comment.id %>">
|
2016-10-25 13:56:25 +08:00
|
|
|
<% if length <= 2 %>
|
2016-11-25 18:01:50 +08:00
|
|
|
<%=render :partial => 'users/comment_reply', :locals => {:comment => comment.parent, :type => type, :user_activity_id => user_activity_id, :parent_id => comment.id} %>
|
2016-07-21 10:30:48 +08:00
|
|
|
<% else %>
|
|
|
|
<div class="orig_cont clearfix">
|
|
|
|
<div class="orig_cont clearfix">
|
2016-10-25 13:56:25 +08:00
|
|
|
<!--<div>-->
|
|
|
|
<!--<%#=render :partial => 'users/comment_reply', :locals => {:comment => parents_rely[length - 1]} %>-->
|
|
|
|
<!--</div>-->
|
2016-11-25 18:01:50 +08:00
|
|
|
<%=render :partial => 'users/comment_reply_detail', :locals => {:comment => parents_rely[length - 1], :type => type, :user_activity_id => user_activity_id, :parent_id => comment.id} %>
|
2016-07-21 10:30:48 +08:00
|
|
|
</div>
|
|
|
|
<div class="orig_cont_hide clearfix">
|
|
|
|
<span class="orig_icon" >↓ </span>
|
2016-10-25 13:56:25 +08:00
|
|
|
<span class="orig_icon" style="display:none;" > ↑</span><span class="">已经隐藏<%=(length - 2).to_s %>个楼层</span>
|
2016-11-25 18:01:50 +08:00
|
|
|
<%= link_to '[点击展开]', show_all_replies_users_path(:comment => comment, :type => comment.class, :user_activity_id => user_activity_id, :parent_id => comment.id), :remote=>true, :class => 'linkBlue2' %>
|
2016-07-21 10:30:48 +08:00
|
|
|
</div>
|
2016-11-25 18:01:50 +08:00
|
|
|
<%=render :partial => 'users/comment_reply_detail', :locals => {:comment => parents_rely[0], :type => type, :user_activity_id => user_activity_id, :parent_id => comment.id} %>
|
2016-07-21 10:30:48 +08:00
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<% end %>
|