多级回复的显示调整

This commit is contained in:
cxt 2016-12-09 10:01:53 +08:00
parent abdbfd87b0
commit 67d23a2161
5 changed files with 65 additions and 35 deletions

View File

@ -7,17 +7,26 @@
<% parents_rely = get_reply_parents parents_rely, comment %> <% parents_rely = get_reply_parents parents_rely, comment %>
<% length = parents_rely.length %> <% length = parents_rely.length %>
<div id="comment_reply_<%=comment.id %>"> <div id="comment_reply_<%=comment.id %>">
<% if length <= 2 %> <% if length <= 5 %>
<%=render :partial => 'projects/project_issue_comments_reply', :locals => {:comment => comment.parent, :user_activity_id => user_activity_id, :parent_id => comment.id} %> <%=render :partial => 'projects/project_issue_comments_reply', :locals => {:comment => comment.parent, :user_activity_id => user_activity_id, :parent_id => comment.id} %>
<% else %> <% else %>
<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 class="orig_cont clearfix">
</div> <div class="orig_cont clearfix">
<div class="orig_cont_hide_issue clearfix"> <div class="orig_cont clearfix">
<span class="orig_icon" >&darr; </span> <%=render :partial => 'projects/project_issue_comments_reply_detail', :locals => {:comment => parents_rely[length - 1], :user_activity_id => user_activity_id, :parent_id => comment.id} %>
<span class="orig_icon" style="display:none;" > &uarr;</span><span class="">已经隐藏<%=(length - 2).to_s %>个楼层</span> </div>
<%= 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 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> </div>
<%=render :partial => 'projects/project_issue_comments_reply_detail', :locals => {:comment => parents_rely[0], :user_activity_id => user_activity_id, :parent_id => comment.id} %> <%=render :partial => 'projects/project_issue_comments_reply_detail', :locals => {:comment => parents_rely[0], :user_activity_id => user_activity_id, :parent_id => comment.id} %>
</div> </div>

View File

@ -7,17 +7,26 @@
<% parents_rely = get_reply_parents_no_root parents_rely, comment %> <% parents_rely = get_reply_parents_no_root parents_rely, comment %>
<% length = parents_rely.length %> <% length = parents_rely.length %>
<div id="comment_reply_<%=comment.id %>"> <div id="comment_reply_<%=comment.id %>">
<% if length <= 2 %> <% if length <= 5 %>
<%=render :partial => 'projects/journal_comment_reply', :locals => {:comment => comment.parent, :user_activity_id => user_activity_id, :parent_id => comment.id} %> <%=render :partial => 'projects/journal_comment_reply', :locals => {:comment => comment.parent, :user_activity_id => user_activity_id, :parent_id => comment.id} %>
<% else %> <% else %>
<div class="orig_cont clearfix"> <div class="orig_cont clearfix">
<div class="orig_cont clearfix"> <div class="orig_cont clearfix">
<%=render :partial => 'projects/comment_reply_detail', :locals => {:comment => parents_rely[length - 1], :user_activity_id => user_activity_id, :parent_id => comment.id} %> <div class="orig_cont clearfix">
</div> <div class="orig_cont clearfix">
<div class="orig_cont_hide_issue clearfix"> <div class="orig_cont clearfix">
<span class="orig_icon" >&darr; </span> <%=render :partial => 'projects/comment_reply_detail', :locals => {:comment => parents_rely[length - 1], :user_activity_id => user_activity_id, :parent_id => comment.id} %>
<span class="orig_icon" style="display:none;" > &uarr;</span><span class="">已经隐藏<%=(length - 2).to_s %>个楼层</span> </div>
<%= link_to '[点击展开]', show_all_replies_users_path(:comment => comment, :type => 'is_project_message', :user_activity_id => user_activity_id, :parent_id => comment.id), :remote=>true, :class => 'linkBlue2' %> <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_message', :user_activity_id => user_activity_id, :parent_id => comment.id), :remote=>true, :class => 'linkBlue2' %>
</div>
<%=render :partial => 'projects/comment_reply_detail', :locals => {:comment => parents_rely[3], :user_activity_id => user_activity_id, :parent_id => comment.id} %>
</div>
<%=render :partial => 'projects/comment_reply_detail', :locals => {:comment => parents_rely[2], :user_activity_id => user_activity_id, :parent_id => comment.id} %>
</div>
<%=render :partial => 'projects/comment_reply_detail', :locals => {:comment => parents_rely[1], :user_activity_id => user_activity_id, :parent_id => comment.id} %>
</div> </div>
<%=render :partial => 'projects/comment_reply_detail', :locals => {:comment => parents_rely[0], :user_activity_id => user_activity_id, :parent_id => comment.id} %> <%=render :partial => 'projects/comment_reply_detail', :locals => {:comment => parents_rely[0], :user_activity_id => user_activity_id, :parent_id => comment.id} %>
</div> </div>

View File

@ -7,20 +7,26 @@
<% parents_rely = get_reply_parents_no_root parents_rely, comment %> <% parents_rely = get_reply_parents_no_root parents_rely, comment %>
<% length = parents_rely.length %> <% length = parents_rely.length %>
<div id="comment_reply_<%=comment.id %>"> <div id="comment_reply_<%=comment.id %>">
<% if length <= 2 %> <% if length <= 5 %>
<%=render :partial => 'users/journal_comment_reply', :locals => {:comment => comment.parent, :type => type, :user_activity_id => user_activity_id, :parent_id => comment.id} %> <%=render :partial => 'users/journal_comment_reply', :locals => {:comment => comment.parent, :type => type, :user_activity_id => user_activity_id, :parent_id => comment.id} %>
<% else %> <% else %>
<div class="orig_cont clearfix"> <div class="orig_cont clearfix">
<div class="orig_cont clearfix"> <div class="orig_cont clearfix">
<!--<div>--> <div class="orig_cont clearfix">
<!--<%#=render :partial => 'users/journal_comment_reply', :locals => {:comment => parents_rely[length - 1]} %>--> <div class="orig_cont clearfix">
<!--</div>--> <div class="orig_cont clearfix">
<%=render :partial => 'users/comment_reply_detail', :locals => {:comment => parents_rely[length - 1], :type => type, :user_activity_id => user_activity_id, :parent_id => comment.id} %> <%=render :partial => 'users/comment_reply_detail', :locals => {:comment => parents_rely[length - 1], :type => type, :user_activity_id => user_activity_id, :parent_id => comment.id} %>
</div> </div>
<div class="orig_cont_hide clearfix"> <div class="orig_cont_hide clearfix">
<span class="orig_icon" >&darr; </span> <span class="orig_icon" >&darr; </span>
<span class="orig_icon" style="display:none;" > &uarr;</span><span class="">已经隐藏<%=(length - 2).to_s %>个楼层</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 => comment.class, :user_activity_id => user_activity_id, :parent_id => comment.id),:remote=>true, :class => 'linkBlue2' %> <%= 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' %>
</div>
<%=render :partial => 'users/comment_reply_detail', :locals => {:comment => parents_rely[3], :type => type, :user_activity_id => user_activity_id, :parent_id => comment.id} %>
</div>
<%=render :partial => 'users/comment_reply_detail', :locals => {:comment => parents_rely[2], :type => type, :user_activity_id => user_activity_id, :parent_id => comment.id} %>
</div>
<%=render :partial => 'users/comment_reply_detail', :locals => {:comment => parents_rely[1], :type => type, :user_activity_id => user_activity_id, :parent_id => comment.id} %>
</div> </div>
<%=render :partial => 'users/comment_reply_detail', :locals => {:comment => parents_rely[0], :type => type, :user_activity_id => user_activity_id, :parent_id => comment.id} %> <%=render :partial => 'users/comment_reply_detail', :locals => {:comment => parents_rely[0], :type => type, :user_activity_id => user_activity_id, :parent_id => comment.id} %>
</div> </div>

View File

@ -7,20 +7,26 @@
<% parents_rely = get_reply_parents parents_rely, comment %> <% parents_rely = get_reply_parents parents_rely, comment %>
<% length = parents_rely.length %> <% length = parents_rely.length %>
<div id="comment_reply_<%=comment.id %>"> <div id="comment_reply_<%=comment.id %>">
<% if length <= 2 %> <% if length <= 5 %>
<%=render :partial => 'users/comment_reply', :locals => {:comment => comment.parent, :type => type, :user_activity_id => user_activity_id, :parent_id => comment.id} %> <%=render :partial => 'users/comment_reply', :locals => {:comment => comment.parent, :type => type, :user_activity_id => user_activity_id, :parent_id => comment.id} %>
<% else %> <% else %>
<div class="orig_cont clearfix"> <div class="orig_cont clearfix">
<div class="orig_cont clearfix"> <div class="orig_cont clearfix">
<!--<div>--> <div class="orig_cont clearfix">
<!--<%#=render :partial => 'users/comment_reply', :locals => {:comment => parents_rely[length - 1]} %>--> <div class="orig_cont clearfix">
<!--</div>--> <div class="orig_cont clearfix">
<%=render :partial => 'users/comment_reply_detail', :locals => {:comment => parents_rely[length - 1], :type => type, :user_activity_id => user_activity_id, :parent_id => comment.id} %> <%=render :partial => 'users/comment_reply_detail', :locals => {:comment => parents_rely[length - 1], :type => type, :user_activity_id => user_activity_id, :parent_id => comment.id} %>
</div> </div>
<div class="orig_cont_hide clearfix"> <div class="orig_cont_hide clearfix">
<span class="orig_icon" >&darr; </span> <span class="orig_icon" >&darr; </span>
<span class="orig_icon" style="display:none;" > &uarr;</span><span class="">已经隐藏<%=(length - 2).to_s %>个楼层</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 => comment.class, :user_activity_id => user_activity_id, :parent_id => comment.id), :remote=>true, :class => 'linkBlue2' %> <%= 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' %>
</div>
<%=render :partial => 'users/comment_reply_detail', :locals => {:comment => parents_rely[3], :type => type, :user_activity_id => user_activity_id, :parent_id => comment.id} %>
</div>
<%=render :partial => 'users/comment_reply_detail', :locals => {:comment => parents_rely[2], :type => type, :user_activity_id => user_activity_id, :parent_id => comment.id} %>
</div>
<%=render :partial => 'users/comment_reply_detail', :locals => {:comment => parents_rely[1], :type => type, :user_activity_id => user_activity_id, :parent_id => comment.id} %>
</div> </div>
<%=render :partial => 'users/comment_reply_detail', :locals => {:comment => parents_rely[0], :type => type, :user_activity_id => user_activity_id, :parent_id => comment.id} %> <%=render :partial => 'users/comment_reply_detail', :locals => {:comment => parents_rely[0], :type => type, :user_activity_id => user_activity_id, :parent_id => comment.id} %>
</div> </div>

View File

@ -1402,7 +1402,7 @@ a:hover.comment_ding_link{ color:#269ac9;}
.orig_textarea{width:90%; margin-bottom:10px;} .orig_textarea{width:90%; margin-bottom:10px;}
.orig_sub{ float:right; background-color:#269ac9; color:#fff; height:25px; line-height:25px; text-align:center; width:80px; border:none;} .orig_sub{ float:right; background-color:#269ac9; color:#fff; height:25px; line-height:25px; text-align:center; width:80px; border:none;}
.orig_sub:hover{ background:#297fb8;} .orig_sub:hover{ background:#297fb8;}
.orig_cont_hide{ text-align:center; width:632px; display:block; font-size:14px; color:#333; border-bottom:1px solid #F3DDB3; padding:5px 0;} .orig_cont_hide{ text-align:center; display:block; font-size:14px; color:#333; border-bottom:1px solid #F3DDB3; padding:5px 0;}
.orig_cont_hide_issue{ text-align:center; width:882px; display:block; font-size:14px; color:#333; border-bottom:1px solid #F3DDB3; padding:5px 0;} .orig_cont_hide_issue{ text-align:center; width:882px; display:block; font-size:14px; color:#333; border-bottom:1px solid #F3DDB3; padding:5px 0;}
.orig_icon{ color:#888; margin-right:10px; font-size:14px; font-weight:bold;} .orig_icon{ color:#888; margin-right:10px; font-size:14px; font-weight:bold;}