socialforge/app/views/words/_message.html.erb

35 lines
1.5 KiB
Plaintext

<!-- fq -->
<% if jour.size >0 %>
<% remove_allowed = (User.current.id == jour.first.user_id) %>
<% journals = jour.reverse%>
<% for journal in journals%>
<table width="660px" border="0" align="center">
<tr>
<td colspan="2" valign="top" width="50" ><img src="/images/new/news.png" width="40" height="40"/></td>
<td><table width="580px" border="0">
<tr>
<td colspan="2" valign="top"><strong> <%=link_to journal.user, user_path(journal.user)%></strong>
<% if @user == User.current%>
<a class="font_lighter">给我留言了</a>
<% else %>
<a class="font_lighter">给他留言了</a>
<% end %>
</td>
</tr>
<tr>
<td colspan="2" width="580px" ><p class="font_description"><%= textilizable journal.notes%></p></td>
</tr>
<tr>
<td align="left"><a class="font_lighter"> <%= format_time journal.created_at %></a></td>
<td width="200" align="right" class="a"><%= 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 %></td>
</tr>
</table></td>
</tr>
</table>
<% end %>
<% end %>