|
|
|
@ -276,7 +276,8 @@
|
|
|
|
|
<% count=activity.journals_for_messages.count %>
|
|
|
|
|
<div class="homepagePostReply">
|
|
|
|
|
<div class="homepagePostReplyBanner">
|
|
|
|
|
<div class="homepagePostReplyBannerCount">回复
|
|
|
|
|
<div class="homepagePostReplyBannerCount"><span>回复</span>
|
|
|
|
|
<span class="reply_iconup" > ︿</span>
|
|
|
|
|
<sapn class="mr15"><%= count>0 ? "(#{count})" : "" %></sapn><span style="color: #cecece;">▪</span>
|
|
|
|
|
<span id="praise_count_<%=user_activity_id %>">
|
|
|
|
|
<% if activity.user == User.current %>
|
|
|
|
@ -318,23 +319,60 @@
|
|
|
|
|
<% else %>
|
|
|
|
|
<%= link_to comment.try(:user).try(:realname), user_url_in_org(comment.user_id), :class => "newsBlue mr10 f14" %>
|
|
|
|
|
<% end %>
|
|
|
|
|
<%= format_time(comment.created_on) %>
|
|
|
|
|
<span id="reply_praise_count_<%=comment.id %>">
|
|
|
|
|
<% if comment.user == User.current %>
|
|
|
|
|
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "(#{get_praise_num(comment)})" : "" %></span></span>
|
|
|
|
|
<%= time_from_now(comment.created_on) %>
|
|
|
|
|
</div>
|
|
|
|
|
<% unless comment.m_parent_id.nil? %>
|
|
|
|
|
<% parents_rely = [] %>
|
|
|
|
|
<% parents_rely = get_reply_parents parents_rely, comment %>
|
|
|
|
|
<% length = parents_rely.length %>
|
|
|
|
|
<div id="comment_reply_<%=comment.id %>">
|
|
|
|
|
<% if length <= 3 %>
|
|
|
|
|
<%=render :partial => 'users/comment_reply', :locals => {:comment => comment.parent} %>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
|
|
|
|
<div class="orig_cont clearfix">
|
|
|
|
|
<div class="orig_cont clearfix">
|
|
|
|
|
<div id="comment_reply_<%=parents_rely[length - 1].id %>">
|
|
|
|
|
<%=render :partial => 'users/comment_reply', :locals => {:comment => parents_rely[length - 1]} %>
|
|
|
|
|
</div>
|
|
|
|
|
<%=render :partial => 'users/comment_reply_detail', :locals => {:comment => parents_rely[length - 2]} %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="orig_cont_hide clearfix"><span class="orig_icon" >↓ </span><span class="orig_icon" style="display:none;" > ↑</span><%= link_to '点击展开隐藏楼层', show_all_replies_users_path(:comment => comment),:remote=>true %></div>
|
|
|
|
|
<%=render :partial => 'users/comment_reply_detail', :locals => {:comment => parents_rely[0]} %>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
</span>
|
|
|
|
|
<div id="message_edit_<%=comment.id %>" style="display: none" class="mr10 fr">
|
|
|
|
|
<% if User.current.admin? ||is_teacher || comment.user == User.current%>
|
|
|
|
|
<%= link_to('删除', {:controller => 'words', :action => 'destroy', :object_id => comment, :user_id => comment.user,:user_activity_id => user_activity_id, :is_in_course => -1,:course_activity=>course_activity},
|
|
|
|
|
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "replyGrey fr ml10", :title => l(:button_delete)) %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
|
|
|
|
<%= comment.notes.html_safe %></div>
|
|
|
|
|
<div class="orig_reply mb10 mt-10">
|
|
|
|
|
<div class="reply">
|
|
|
|
|
<span class="reply-right">
|
|
|
|
|
<span id="reply_praise_count_<%=comment.id %>">
|
|
|
|
|
<% if comment.user == User.current %>
|
|
|
|
|
<span class="fr likeButton" title="不能自己赞自己哦!"> <span class="likeText">赞</span><span class="likeNum"><%= get_praise_num(comment) > 0 ? "(#{get_praise_num(comment)})" : "" %></span></span>
|
|
|
|
|
<% else %>
|
|
|
|
|
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
|
|
|
|
<% end %>
|
|
|
|
|
</span>
|
|
|
|
|
<span style="position: relative" class="fr mr20">
|
|
|
|
|
<%= link_to(
|
|
|
|
|
l(:button_reply),
|
|
|
|
|
{:controller => 'users' ,:action => 'reply_to', :reply_id => comment.id, :type => 'HomeworkCommon', :is_in_course => -1, :user_activity_id => user_activity_id, :course_activity=>course_activity},
|
|
|
|
|
:remote => true,
|
|
|
|
|
:method => 'get',
|
|
|
|
|
:title => l(:button_reply)) %>
|
|
|
|
|
<span id="reply_iconup_<%=comment.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
|
|
|
|
</span>
|
|
|
|
|
<!--<a action-type="reply" href="javascript:;" poped="false" class="fr mr20 linkGrey3" title="回复">回复</a>-->
|
|
|
|
|
<% if User.current.admin? ||is_teacher || comment.user == User.current%>
|
|
|
|
|
<%= link_to('删除', {:controller => 'words', :action => 'destroy', :object_id => comment, :user_id => comment.user,:is_in_course => -1, :user_activity_id => user_activity_id, :course_activity=>course_activity},
|
|
|
|
|
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "fr mr20", :title => l(:button_delete)) %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</span>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<p id="reply_message_<%= comment.id%>"></p>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</li>
|
|
|
|
|