From 0e46d0ac27b8334dcf2d884906a58b9b0974ac51 Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 3 May 2016 17:11:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=8C=E7=BA=A7=E5=9F=9F=E5=90=8D=E4=B8=AD?= =?UTF-8?q?=E5=B8=96=E5=AD=90=E5=9B=9E=E5=A4=8D=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../_show_sub_document.html.erb | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/app/views/sub_document_comments/_show_sub_document.html.erb b/app/views/sub_document_comments/_show_sub_document.html.erb index 26ffd0ec1..0e5c9a2b0 100644 --- a/app/views/sub_document_comments/_show_sub_document.html.erb +++ b/app/views/sub_document_comments/_show_sub_document.html.erb @@ -41,6 +41,78 @@ + <% comments_for_doc = document.children.reorder("created_at desc") %> + <% count = document.children.count() %> + +
+
+
回复 + <%= count>0 ? "(#{count})" : "" %> + + + + + + + +
+ <% if count > 3 %> + + <% end %> +
+
+
    + <% reply_id = 0 %> + <% comments_for_doc.each do |comment| %> + <% reply_id += 1 %> +
  • +
    <%= link_to image_tag(url_to_avatar(User.find(comment.creator_id)), :width => 33, :height => 33, :alt => "用户头像"), user_url_in_org(comment.creator_id) %>
    +
    +
    + <%= link_to User.find(comment.creator_id), user_url_in_org(comment.creator_id), :class => "newsBlue mr10 f14" %> + <%= format_activity_day(comment.created_at) %> <%= format_time(comment.created_at, false) %> + + + + + + + +
    + <% unless comment.content.blank? %> +
    <%= comment.content.html_safe %>
    + <% end %> +
    +
    +
  • + <% end %> +
+
+
+
+ <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33", :alt => "用户头像"), user_url_in_org(User.current.id) %> +
+
+
+ <%= form_for('new_form', :url => add_reply_org_document_comment_path(:id => document.id, :act_id => act.id, :flag => flag), :method => "post", :remote => true) do |f| %> + +
+ + + +
+

+ <% end %> +
+
+
+
+
+