socialforge/app/views/sub_document_comments/_show_newstyle.html.erb

54 lines
3.5 KiB
Plaintext
Raw Normal View History

<div class="sn-innner-content">
<div class="sn-row sn-bg-white">
<div class="sn-content-position sn-hidden"> 您的位置:<%= link_to "首页", organization_path(@organization), :class => "sn-link-grey2" %> &gt;
2016-04-29 16:14:08 +08:00
<%= @org_subfield.name %> &gt;
<%= link_to @subdomain.name, org_subfield_sub_domain_path(@subdomain), :class => "sn-link-grey2" %> &gt;
<%= link_to @document.title, org_subfield_sub_domain_sub_document_comment_path(@document), :class => "sn-link-grey2" %> </div>
</div>
<div class="sn-inner-newslist">
<h2 class="sn-inner-newsh2 sn-hidden"><%= @document.title %></h2>
<div class="sn-inner-newscon">
2016-05-05 20:59:02 +08:00
<p class=" sn-inner-psmall">来源:<%= @organization.name %> 发布时间:<%= format_date(@document.created_at) %> 浏览:<%= @organization.visits %>次</p>
2016-04-29 16:14:08 +08:00
<p class=" sn-inner-pcon"><%= @document.content.html_safe %></p>
</div>
</div>
<!--回复-->
<% if User.current.logged? %>
<% comments_for_doc = @document.children.reorder("created_at desc") %>
<% count = @document.children.count() %>
<div class="sn-replybox">
<h2 class="sn-reply-h2">留言板<span class="sn-fr sn-f14 sn-font-grey3 sn-mt10"><%= count %>条留言</span></h2>
<%= 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| %>
<textarea class="sn-reply-text" name="sub_content" ></textarea>
<%#= f.kindeditor :sub_content,:width=>'99%',:height => '100px;',:editor_id=>'message_content_editor', :class => "sn-reply-text" %>
<div class="sn-reply-btnbox">
<%= link_to l(:button_reply), "javascript:void(0)", :onclick => "$('#message_form').submit();", :class => "submit-btn" %>
</div>
<%#= link_to l(:button_cancel), "javascript:void(0)", :onclick => 'message_content_editor.html("");', :class => " grey_btn fr c_white mt10 mr5" %>
<% end %>
<div class="sn-reply-comment">
<h2 class="sn-comment-h2">全部评论</h2>
2016-05-04 11:04:41 +08:00
<div id="newstyle_reply_div_<%= document.id %>" style="display:<%= count == 0 ? 'none' : 'block' %>">
<% comments_for_doc.each_with_index do |reply,i| %>
<div class="sn-comment-listbox">
<a href="javascript:void(0)" class="sn-reply-userpic fl"><img src="images/img-news-con.jpg" width="824" height="522" alt="" /></a>
<%= link_to User.find(reply.creator_id).realname, user_url_in_org(reply.creator_id), :class => "sn-reply-username fl" %><span class="fl"><%= time_from_now(reply.created_at) %></span>
<p class="fl sn-reply-usertxt "><%= reply.content.html_safe unless reply.content.nil? %></p>
<!--<a href="javascript:void(0)" target="_blank" class="sn-reply-zan fl">100</a>-->
<div class="cl"></div>
</div>
<% end %>
</div>
<% if count > 3 %>
<div class="sn-reply-more">
<a id="reply_btn_<%= document.id %>" onclick="expand_reply('#newstyle_reply_div_<%= document.id %> li','#reply_btn_<%=document.id%>')" data-count="<%= count %>" data-init="0" href="javascript:void(0)" value="show_help">
展开回复
</a>
</div>
<% end %>
</div>
</div>
<% end %>
</div>