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

40 lines
1.8 KiB
Plaintext
Raw Normal View History

2013-08-04 10:59:25 +08:00
<!-- fq -->
2013-08-01 10:33:49 +08:00
<% if jour.size >0 %>
<% remove_allowed = (User.current.id == jour.first.user_id) %>
<% for journal in jour%>
2013-08-01 10:33:49 +08:00
<table width="660px" border="0" align="center">
<tr>
<td colspan="2" valign="top" width="50" ><%= link_to image_tag(url_to_avatar(journal.user), :class => "avatar"), user_path(journal.user), :class => "avatar" %></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 %> <span class="font_lighter"><%= l(:label_leave_me_message) %></span> <% else %> <span class="font_lighter"><%= l(:label_leave_others_message) %></span> <% end %> </td>
</tr>
<tr>
<td colspan="2" width="580px" >
<p class="font_description">
<%= textilizable journal.notes%>
</p></td>
</tr>
<tr>
<td align="left"><span class="font_lighter"> <%= format_time journal.created_on %></span></td>
<td width="200" align="right" class="a"> <% if @user == User.current %>
2013-09-12 10:41:15 +08:00
<%= link_to(l(:label_newfeedback_quote), {:controller => 'words', :action => 'new', :id => user, :journal_id => journal}, :remote => true,
:method => 'post', :title => l(:button_quote))%>
2013-09-12 10:41:15 +08:00
<%= 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 %></td>
<% else %>
2013-09-12 10:41:15 +08:00
<%= link_to(l(:label_newfeedback_quote), {:controller => 'words', :action => 'new', :id => user, :journal_id => journal}, :remote => true,
:method => 'post', :title => l(:button_quote))%>
<% end %>
</tr>
</table></td>
</tr>
2013-08-01 10:33:49 +08:00
</table>
<div class="line_under"></div>
2013-08-01 10:33:49 +08:00
<% end %>
<% end %>