|
|
|
@ -91,9 +91,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div class="postDetailDate mb5"><%= format_time( @article.created_on)%></div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<!--<div class="homepagePostIntro memo-content upload_img break_word" id="message_description_<%= @article.id %>" style="word-break: break-all; word-wrap:break-word;margin-bottom: 0px !important;" >-->
|
|
|
|
|
<!--<%#= @article.content.html_safe%>-->
|
|
|
|
|
<!--</div>-->
|
|
|
|
|
|
|
|
|
|
<%=render :partial =>"users/intro_content", :locals=>{:user_activity_id =>@article.id, :content=>@article.content} %>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<div class=" fl" style="width: 600px">
|
|
|
|
@ -107,73 +105,84 @@
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<% count=0 %>
|
|
|
|
|
<% if @article.parent %>
|
|
|
|
|
<% count=@article.parent.children.count%>
|
|
|
|
|
<% else %>
|
|
|
|
|
<% count=@article.children.count%>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% all_comments = []%>
|
|
|
|
|
<% count=get_all_children(all_comments, @article).count %>
|
|
|
|
|
<div class="homepagePostReply">
|
|
|
|
|
<%# unless count == 0 %>
|
|
|
|
|
<div class="homepagePostReplyBanner">
|
|
|
|
|
<div class="homepagePostReplyBannerCount">回复
|
|
|
|
|
<sapn class="mr15"><%= count>0 ? "(#{count})" : "" %></sapn><span style="color: #cecece;">▪</span>
|
|
|
|
|
<span id="praise_count_<%=@article.id %>">
|
|
|
|
|
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>@article, :user_activity_id=>@article.id,:type=>"activity"}%>
|
|
|
|
|
<div class="homepagePostReplyBanner">
|
|
|
|
|
<div class="homepagePostReplyBannerCount">回复
|
|
|
|
|
<sapn class="mr15"><%= count>0 ? "(#{count})" : "" %></sapn>
|
|
|
|
|
<span style="color: #cecece;">▪</span>
|
|
|
|
|
<span id="praise_count_<%= @article.id %>">
|
|
|
|
|
<%= render :partial => "praise_tread/praise", :locals => {:activity => @article, :user_activity_id => @article.id, :type => "activity"} %>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="homepagePostReplyBannerTime"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="" id="reply_div_<%= @article.id %>">
|
|
|
|
|
<%@article.children.reorder('created_on desc').each_with_index do |reply,i| %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="homepagePostReplyBannerTime"></div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<% all_comments = []%>
|
|
|
|
|
<% comments = get_all_children(all_comments, @article) %>
|
|
|
|
|
<% if count > 0 %>
|
|
|
|
|
<div class="" id="reply_div_<%= @article.id %>">
|
|
|
|
|
<% comments.each do |comment| %>
|
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
$(function(){
|
|
|
|
|
showNormalImage('reply_message_description_<%= reply.id %>');
|
|
|
|
|
autoUrl('reply_message_description_<%= reply.id %>');
|
|
|
|
|
showNormalImage('reply_content_<%= comment.id %>');
|
|
|
|
|
autoUrl('reply_content_<%= comment.id %>');
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
<div class="homepagePostReplyContainer" onmouseover="$('#reply_edit_menu_<%= reply.id%>').show();" onmouseout="$('#reply_edit_menu_<%= reply.id%>').hide();">
|
|
|
|
|
<li class="homepagePostReplyContainer" nhname="reply_rec">
|
|
|
|
|
<div class="homepagePostReplyPortrait">
|
|
|
|
|
<%= link_to image_tag(url_to_avatar(reply.author), :width => 33,:height => 33), user_path(reply.author) %>
|
|
|
|
|
<%= link_to image_tag(url_to_avatar(comment.creator_user), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_user.id) %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="homepagePostReplyDes">
|
|
|
|
|
<div class="homepagePostReplyPublisher">
|
|
|
|
|
<%= link_to reply.author.show_name, user_path(reply.author_id,:host=>Setting.host_user), :class => "newsBlue mr10 f14" %>
|
|
|
|
|
<%= link_to comment.creator_user.show_name, user_url_in_org(comment.creator_user.id), :class => "newsBlue mr10 f14" %>
|
|
|
|
|
<%= time_from_now(comment.created_on) %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="homepagePostReplyContent upload_img break_word" id="reply_message_description_<%= reply.id %>">
|
|
|
|
|
<%= reply.content.html_safe%>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="margin-top: -7px; margin-bottom: 5px">
|
|
|
|
|
<%= format_time(reply.created_on) %>
|
|
|
|
|
<span id="reply_praise_count_<%=reply.id %>">
|
|
|
|
|
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
|
|
|
|
|
<% if !comment.parent.nil? && !comment.parent.parent.nil? %>
|
|
|
|
|
<%= render :partial => 'users/message_contents', :locals => {:comment => comment}%>
|
|
|
|
|
<% end %>
|
|
|
|
|
<% if !comment.content_detail.blank? %>
|
|
|
|
|
<div class="homepagePostReplyContent break_word list_style upload_img table_maxWidth" id="reply_content_<%= comment.id %>">
|
|
|
|
|
<%= comment.content_detail.html_safe %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="orig_reply mb10 mt-10">
|
|
|
|
|
<div class="reply">
|
|
|
|
|
<span class="reply-right">
|
|
|
|
|
<span id="reply_praise_count_<%=comment.id %>">
|
|
|
|
|
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>comment, :user_activity_id=>comment.id,:type=>"reply"}%>
|
|
|
|
|
</span>
|
|
|
|
|
<div class="fr mr10" id="reply_edit_menu_<%= reply.id%>" style="display: none">
|
|
|
|
|
<span style="position: relative" class="fr mr20">
|
|
|
|
|
<%= link_to(
|
|
|
|
|
l(:button_reply),
|
|
|
|
|
{:controller => 'blog_comments',:action => 'quote',:user_id=>reply.author_id,:blog_id=>reply.blog_id, :id => reply.id},
|
|
|
|
|
{:controller => 'blog_comments', :action => 'quote', :user_id => comment.author_id, :blog_id => comment.blog_id, :id => comment.id},
|
|
|
|
|
:remote => true,
|
|
|
|
|
:method => 'get',
|
|
|
|
|
:class => 'fr newsBlue',
|
|
|
|
|
:title => l(:button_reply)) if !@article.locked? && User.current.logged? %>
|
|
|
|
|
:title => l(:button_reply)) if !@article.locked? %>
|
|
|
|
|
<span id="reply_iconup_<%=comment.id %>" class="reply_iconup02" style="display: none"> ︿</span>
|
|
|
|
|
</span>
|
|
|
|
|
<% if comment.author == User.current %>
|
|
|
|
|
<%= link_to(
|
|
|
|
|
l(:button_delete),
|
|
|
|
|
{:controller => 'blog_comments',:action => 'destroy', :id => reply.id},
|
|
|
|
|
{:controller => 'blog_comments', :action => 'destroy', :id => comment.id},
|
|
|
|
|
:method => :delete,
|
|
|
|
|
:class => 'fr newsGrey mr10',
|
|
|
|
|
:class => 'fr mr20',
|
|
|
|
|
:data => {:confirm => l(:text_are_you_sure)},
|
|
|
|
|
:title => l(:button_delete)
|
|
|
|
|
) if reply.author.id == User.current.id %>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<p id="reply_message_<%= reply.id%>"></p>
|
|
|
|
|
) %>
|
|
|
|
|
<% end %>
|
|
|
|
|
</span>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<p id="reply_message_<%= comment.id%>"></p>
|
|
|
|
|
<% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
</li><% end %>
|
|
|
|
|
</div>
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
<%# end %>
|
|
|
|
|
<div class="cl"></div>
|
|
|
|
|
<% if !@article.locked? && User.current.logged?%>
|
|
|
|
|
<div class="talkWrapMsg" nhname="about_talk_reply">
|
|
|
|
|