socialforge/app/views/projects/_project_issue_contents.htm...

35 lines
2.5 KiB
Plaintext

<div class="homepagePostReplyPublisher">
<%= link_to comment.creator_user.show_name, user_url_in_org(comment.creator_user.id), :class => "newsBlue mr10 f14" %>
<%= 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 %>">
<% if length <= 5 %>
<%=render :partial => 'projects/project_issue_comments_reply', :locals => {:comment => comment.parent, :user_activity_id => user_activity_id, :parent_id => comment.id} %>
<% else %>
<div class="orig_cont clearfix">
<div class="orig_cont clearfix">
<div class="orig_cont clearfix">
<div class="orig_cont clearfix">
<div class="orig_cont clearfix">
<%=render :partial => 'projects/project_issue_comments_reply_detail', :locals => {:comment => parents_rely[length - 1], :user_activity_id => user_activity_id, :parent_id => comment.id} %>
</div>
<div class="orig_cont_hide clearfix">
<span class="orig_icon" >&darr; </span>
<span class="orig_icon" style="display:none;" > &uarr;</span><span class="">已经隐藏<%=(length - 5).to_s %>个楼层</span>
<%= link_to '[点击展开]', show_all_replies_users_path(:comment => comment, :type => 'is_project_issue', :user_activity_id => user_activity_id, :parent_id => comment.id), :remote=>true, :class => 'linkBlue2' %>
</div>
<%=render :partial => 'projects/project_issue_comments_reply_detail', :locals => {:comment => parents_rely[3], :user_activity_id => user_activity_id, :parent_id => comment.id} %>
</div>
<%=render :partial => 'projects/project_issue_comments_reply_detail', :locals => {:comment => parents_rely[2], :user_activity_id => user_activity_id, :parent_id => comment.id} %>
</div>
<%=render :partial => 'projects/project_issue_comments_reply_detail', :locals => {:comment => parents_rely[1], :user_activity_id => user_activity_id, :parent_id => comment.id} %>
</div>
<%=render :partial => 'projects/project_issue_comments_reply_detail', :locals => {:comment => parents_rely[0], :user_activity_id => user_activity_id, :parent_id => comment.id} %>
</div>
<% end %>
</div>
<% end %>