<%= javascript_include_tag "/assets/kindeditor/kindeditor",'/assets/kindeditor/pasteimg',"init_KindEditor","forum" %>
<%= link_to image_tag(url_to_avatar(@memo.author),:width=>50,:height => 50,:alt=>'贴吧图像' ),user_path(@memo.author) %>
<%= format_date( @memo.created_at)%>
<%= render :partial => "memos/praise_tread",:locals => {:obj => @memo,:show_flag => true,:user_id =>User.current.id,:horizontal => true}%>
<%= @memo.content.html_safe%>
<% if @memo.attachments.any?%> <% options = {:author => true, :deletable => @memo.deleted_attach_able_by?(User.current) } %> <%= render :partial => 'attachments_links', :locals => {:attachments => @memo.attachments, :options => options, :is_float => true} %> <% end %>
<%= form_for(@memo_new, url: forum_memos_path, :html => {:multipart => true}) do |f|%> <%= f.hidden_field :subject, :required => true, value: @memo.subject %> <%= f.hidden_field :forum_id, :required => true, value: @memo.forum_id %> <%= f.hidden_field :parent_id, :required => true, value: @memo.id %>

取消 留言 <% end %>
<% @replies.each do |reply| %>
<%= link_to image_tag(url_to_avatar(reply.author), :width => 45,:height => 45), user_path(reply.author) %>
<%= reply.author.name%> <% if reply.parent && reply.parent.id != @memo.id%> 回复<%= reply.parent.author.name%> <% end %> <%= format_date(reply.created_at)%> <%= link_to( l(:button_delete), {:action => 'destroy', :id => reply}, :method => :delete, :data => {:confirm => l(:text_are_you_sure)}, :title => l(:button_delete),:class=>'replyGrey fr ml10' ) if reply.destroyable_by?(User.current) %> 回复
<%= reply.content.html_safe%>
<% end %>