您的位置:<%= link_to "首页", organization_path(@organization), :class => "sn-link-grey2" %> > <%=link_to @org_subfield.name, organization_path(@organization, :org_subfield_id => @org_subfield.id), :class => "sn-link-grey2" %> > <%= link_to @subdomain.name, org_subfield_sub_domain_sub_document_comments_path(:sub_domain_id => @subdomain.id, :org_subfield_id => @org_subfield.id), :class => "sn-link-grey2" %> > <%= @document.title %>

<%= @document.title %>

来源:<%= @organization.name %> 发布时间:<%= format_date(@document.created_at) %>

<%= @document.content.html_safe %>

<% if User.current.logged? %> <% comments_for_doc = @document.children.reorder("created_at desc") %> <% count = @document.children.count() %>

留言板<%= count %>条留言

<%= form_for :org_comment, :url => {:action => 'add_reply_in_doc',:controller => 'sub_document_comments', :id => @document.id, :flag => true}, :html => {:multipart => true, :id => 'message_form', :class => "sn-reply-form", } do |f| %> <%#= f.kindeditor :sub_content,:width=>'99%',:height => '100px;',:editor_id=>'message_content_editor', :class => "sn-reply-text" %> <%#= link_to l(:button_cancel), "javascript:void(0)", :onclick => 'message_content_editor.html("");', :class => " grey_btn fr c_white mt10 mr5" %> <% end %>

全部评论

<% comments_for_doc.each_with_index do |reply,i| %>
<%= link_to User.find(reply.creator_id).realname, user_url_in_org(reply.creator_id), :class => "sn-reply-username fl" %><%= time_from_now(reply.created_at) %>
<%=render :partial =>"users/intro_content", :locals=>{:user_activity_id => reply.id, :content=> reply.content} %> <%#= reply.content.html_safe unless reply.content.nil? %>
<% end %>
<% if count > 3 %> <% end %>
<% end %>