<% if @memo.author%> <%= link_to image_tag(url_to_avatar(@memo.author), :class => "avatar"), user_path(@memo.author) %> <% else %> <%= image_tag('../images/avatars/User/0', :class => "avatar") %> <% end %>

<%=link_to @memo.author.name, user_path(@memo.author) if @memo.author%>

<%#= link_to( l(:button_quote), {:action => 'quote', :id => @memo}, :remote => true, :method => 'get', :title => l(:button_quote) )if !@memo.locked? && User.current.logged? %> <%#= link_to( image_tag('edit.png'), {:action => 'edit', :id => @memo}, :method => 'get', :title => l(:button_edit) ) if @memo.editable_by?(User.current) %> <%#= link_to( l(:button_delete), {:action => 'destroy', :id => @memo}, :method => :delete, :data => {:confirm => l(:text_are_you_sure)}, :title => l(:button_delete) ) if @memo.destroyable_by?(User.current) %>
<%= label_tag l(:field_subject) %>: <%=h @memo.subject %>
<%= raw @memo.content %>

<% 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} %> <% end %>

<% if @memo.author %> <%= authoring @memo.created_at, @memo.author.name %> <% else %> <%= user_url_and_time @memo.username, @memo.userhomeurl, @memo.created_at %> <% end %>
<%= image_tag( "/images/sidebar/tags.png") %> <%= render :partial => 'tags/tag_name', :locals => {:obj => @memo,:object_flag => "9",:non_list_all => true }%>

<%= l(:label_reply_plural) %> (<%= @replies.nil? ? 0 : @replies.size %>)

<% pages_count = @reply_pages.offset %> <% @replies.each do |reply| %>
">

<%= pages_count += 1 %>楼 :

<%#= link_to( l(:button_quote), {:action => 'quote', :id => reply}, :remote => true, :method => 'get', :title => l(:button_quote) )if !@memo.locked? && User.current.logged? %> <%#= link_to( image_tag('edit.png'), {:action => 'edit', :id => reply}, :title => l(:button_edit) ) if reply.editable_by?(User.current) %> <%#= link_to( l(:button_delete), {:action => 'destroy', :id => reply}, :method => :delete, :data => {:confirm => l(:text_are_you_sure)}, :title => l(:button_delete) ) if reply.destroyable_by?(User.current) %>
<% if reply.author%> <%= link_to image_tag(url_to_avatar(reply.author), :class => "avatar"), user_path(reply.author) %> <% else %> <%= image_tag('../images/avatars/User/0', :class => "avatar") %> <% end %>
<%=h reply.content.html_safe %>

<% if reply.attachments.any?%> <% options = {:author => true, :deletable => reply.deleted_attach_able_by?(User.current) } %> <%= render :partial => 'attachments/links', :locals => {:attachments => reply.attachments, :options => options} %> <% end %>

<% if reply.author %> <%= authoring reply.created_at, reply.author.name %> <% else %> <%= user_url_and_time reply.username, reply.userhomeurl, reply.created_at %> <% end %>
<% end %>
<% if User.current.login? %>
<%= render :partial => 'relative_memos/reply_box' %>
<% else %>
<%= l(:label_user_login_tips) %> <%= link_to l(:label_user_login_new), signin_path %>
<% end %>