<%= link_to image_tag(url_to_avatar(@memo.author), :class => "avatar"), user_path(@memo.author) %>

<%=h @memo.author.show_name %>

<%= link_to( image_tag('comment.png'), {: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( image_tag('delete.png'), {: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 %>

<%= link_to_attachments @memo, :author => false %>

<%= authoring @memo.created_at, @memo.author.show_name %>

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

<% reply_count = @current_count.to_i %> <% @replies.each do |reply| %>

<%= reply_count += 1 %>L :

">
<%= link_to( image_tag('comment.png'), {: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( image_tag('delete.png'), {:action => 'destroy', :id => reply}, :method => :delete, :data => {:confirm => l(:text_are_you_sure)}, :title => l(:button_delete) ) if reply.destroyable_by?(User.current) %>
<%= link_to image_tag(url_to_avatar(reply.author), :class => "avatar"), user_path(reply.author) %>
<%=h reply.content.html_safe %>

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

<%= authoring reply.created_at, reply.author.show_name %>
<% end %>
<%= render :partial => 'reply_box' %>