<% if jour.size >0 %> <% remove_allowed = (User.current.id == jour.first.user_id) %> <% for journal in jour%>
<%= link_to image_tag(url_to_avatar(journal.user), :class => "avatar"), user_path(journal.user), :class => "avatar" %> <% else %> <%= link_to(l(:label_newfeedback_quote), {:controller => 'words', :action => 'new', :id => user, :journal_id => journal}, :remote => true, :method => 'post', :title => l(:button_quote))%> <% end %>
<%= link_to journal.user, user_path(journal.user)%> <% if @user == User.current %> <%= l(:label_leave_me_message) %> <% else %> <%= l(:label_leave_others_message) %> <% end %>

<%= textilizable journal.notes%>

<%= format_time journal.created_on %> <% if @user == User.current %> <%= link_to(l(:label_newfeedback_quote), {:controller => 'words', :action => 'new', :id => user, :journal_id => journal}, :remote => true, :method => 'post', :title => l(:button_quote))%> <%= link_to(l(:label_newfeedback_delete), {:controller => 'words', :action => 'destroy', :object_id => journal, :user_id => user}, :remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "delete", :title => l(:button_delete)) if remove_allowed || journal.jour_id == User.current.id %>
<% end %> <% end %>