<% if jour.size >0 %> <% remove_allowed = (User.current.id == jour.first.user_id) %> <% journals = jour.reverse%> <% for journal in journals%>
<%=link_to journal.user, user_path(journal.user)%> 给我留言了

<%= textilizable journal.notes%>

<%= journal.created_at %> <%= link_to(image_tag('comment.png'), {:controller => 'words', :action => 'new', :id => user, :journal_id => journal}, :remote => true, :method => 'post', :title => l(:button_quote))%><%= link_to(image_tag('delete.png'), {:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => user}, :remote => true, :method => 'delete', :class => "delete", :title => l(:button_delete)) if remove_allowed || journal.jour_id == User.current.id %>
<% end %> <% end %>