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

43 lines
1.9 KiB
Plaintext
Raw Normal View History

2013-12-25 21:00:40 +08:00
2013-08-01 10:33:49 +08:00
<% if jour.size >0 %>
<% remove_allowed = (User.current.id == jour.first.user_id) %>
2013-12-25 21:00:40 +08:00
<ul class="message-for-user">
<% for journal in jour%>
2013-12-26 11:05:09 +08:00
<li class="outer-message-for-user">
2013-12-25 15:45:14 +08:00
<span class="portrait"><%= image_tag(url_to_avatar(journal.user), :class => "avatar") %></span>
<span class="body">
<span class="user"><%= link_to journal.user, user_path(journal.user)%></span>
<% if @user == User.current %>
<span class="font_lighter"><%= l(:label_leave_me_message) %>&nbsp;:</span>
2013-12-25 15:45:14 +08:00
<% else %>
<span class="font_lighter"><%= l(:label_leave_others_message) %>&nbsp;:</span>
2013-12-25 15:45:14 +08:00
<% end %>
2013-12-26 15:32:34 +08:00
<p>
2013-12-25 15:45:14 +08:00
<%= textilizable journal.notes%>
2013-12-26 15:32:34 +08:00
</p>
2013-12-25 15:45:14 +08:00
<span class="font_lighter"> <%= l :label_comment_time %>&nbsp; <%= format_time journal.created_on %></span>
<% ids = 'project_respond_form_'+ journal.id.to_s%>
<span>
<%= link_to l(:label_projects_feedback_respond),'',
{:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{ids}'), $('##{ids} textarea'), '#{l(:label_reply_plural)} #{journal.user.show_name}:'); return false;"}
%>
<% if @user == User.current %>
<%= 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>
<% end %>
</span>
2013-12-25 15:45:14 +08:00
</span>
<div style="clear: both;"></div>
2013-12-26 11:05:09 +08:00
<div id=<%= ids %> class="respond-form">
2013-12-25 21:00:40 +08:00
<%= render :partial => 'words/new_respond', :locals => {:journal => journal, :m_reply_id => journal.id} %>
2013-12-25 15:45:14 +08:00
</div>
<div>
2013-12-25 21:00:40 +08:00
<%= render :partial => "words/journal_reply", :locals => {:journal => journal } %>
2013-12-25 15:45:14 +08:00
</div>
</li>
2013-08-01 10:33:49 +08:00
<% end %>
2013-12-25 15:45:14 +08:00
</ul>
2013-08-01 10:33:49 +08:00
<% end %>