<% 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)%> <% if @user == User.current%> 给我留言了 <% else %> 给他留言了 <% end %>

<%= 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 %>