2016-11-29 09:36:38 +08:00
|
|
|
<% @replies.each do |reply| %>
|
|
|
|
<script type="text/javascript">
|
|
|
|
$(function(){
|
|
|
|
$("#activity_description_<%= reply.id %> p,#activity_description_<%= reply.id %> span,#activity_description_<%= reply.id %> em").each(function(){
|
|
|
|
var postContent = $(this).html();
|
|
|
|
postContent = postContent.replace(/ /g," ");
|
|
|
|
postContent= postContent.replace(/ {2}/g," ");
|
|
|
|
postContent=postContent.replace(/ /g," ");
|
|
|
|
postContent=postContent.replace(/ /g," ");
|
|
|
|
postContent = postContent.replace(/<script>*/g, "<script>");
|
|
|
|
postContent = postContent.replace(/<html>*/g, "<html>");
|
|
|
|
$(this).html(postContent);
|
|
|
|
});
|
|
|
|
autoUrl('activity_description_<%= reply.id %>');
|
|
|
|
description_show_hide(<%= reply.id %>);
|
|
|
|
});
|
|
|
|
|
|
|
|
$(".homepagePostReplyDes").mouseover(function(){
|
|
|
|
$(this).find("a[id*='delete_memo_reply']").show();
|
|
|
|
}).mouseout(function(){
|
|
|
|
$(this).find("a[id*='delete_memo_reply']").hide();
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<div class="homepagePostReplyContainer" >
|
|
|
|
<div class="homepagePostReplyPortrait">
|
|
|
|
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
|
|
|
|
</div>
|
|
|
|
<div class="homepagePostReplyDes" onmouseover="$('#delete_reply_<%=reply.id %>').show();" onmouseout="$('#delete_reply_<%=reply.id %>').hide();">
|
|
|
|
<div class="homepagePostReplyPublisher">
|
|
|
|
<%= render :partial => 'users/message_contents', :locals => {:comment => reply, :type => 'Memo', :user_activity_id => @memo.id}%>
|
|
|
|
</div>
|
|
|
|
<div class="homepagePostReplyContent break_word" style="margin-bottom:15px;" id="activity_description_<%= reply.id %>">
|
2016-12-02 20:17:50 +08:00
|
|
|
<p><%= reply.content.gsub(/\/script/, "script").gsub(/script/, " script").html_safe %></p>
|
2016-11-29 09:36:38 +08:00
|
|
|
</div>
|
|
|
|
<div class="orig_reply mb10 mt-10">
|
|
|
|
<div class="reply">
|
|
|
|
<span class="reply-right">
|
2016-11-29 15:29:30 +08:00
|
|
|
<span class="reply_praise_count_<%= reply.id %>">
|
2016-11-29 09:36:38 +08:00
|
|
|
<%= render :partial => "praise_tread/praise", :locals => {:activity => reply, :user_activity_id => reply.id, :type => "reply"} %>
|
|
|
|
</span>
|
|
|
|
<span style="position: relative" class="fr mr20">
|
|
|
|
<%= link_to(
|
|
|
|
l(:button_reply),
|
|
|
|
{:action => 'quote', :id => reply},
|
|
|
|
:remote => true,
|
|
|
|
:method => 'get',
|
|
|
|
:title => l(:button_reply)) %>
|
|
|
|
<span id="reply_iconup_<%= reply.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
|
|
|
</span>
|
|
|
|
<%= link_to(
|
|
|
|
l(:button_delete),
|
|
|
|
forum_memo_path(@memo.forum, reply),
|
|
|
|
:method => :delete,
|
|
|
|
:id => "delete_reply_#{reply.id}",
|
|
|
|
:class => 'fr mr20 undis',
|
|
|
|
:data => {:confirm => l(:text_are_you_sure)},
|
|
|
|
:title => l(:button_delete)
|
2017-01-06 09:22:01 +08:00
|
|
|
) if @memo.author.id == User.current.id || User.current.admin? || User.current == @forum.creator %>
|
2016-11-29 09:36:38 +08:00
|
|
|
</span>
|
|
|
|
<div class="cl"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<p id="reply_message_<%= reply.id%>"></p>
|
|
|
|
</div>
|
|
|
|
<div class="cl"></div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
<% if @limit_count > @page * @limit + 10 %>
|
|
|
|
<div id="more_memo_replies">
|
|
|
|
<div class="detail_cont_hide clearfix">
|
|
|
|
<span class="orig_icon" >↓ </span>
|
|
|
|
<span class="orig_icon" style="display:none;" > ↑</span>
|
|
|
|
<%= link_to '点击展开更多回复', forum_memo_path(@memo.forum_id, @memo, :page => @page),:remote=>true %>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|