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

30 lines
1.6 KiB
Plaintext
Raw Normal View History

2013-12-26 15:32:34 +08:00
<% ids_r = 'reply_respond_form_'+ reply.id.to_s %>
<li onmouseover="$('#<%= ids_r %>').show()" onmouseout="$('#<%= ids_r %>').hide()">
2013-12-25 21:00:40 +08:00
<span class="portrait">
<%= image_tag url_to_avatar(reply.user), :class => "avatar-3" %>
</span>
2013-12-26 10:52:16 +08:00
<div class="body">
2013-12-25 22:21:16 +08:00
<% id = 'project_respond_form_'+ reply.id.to_s %>
2013-12-26 11:05:09 +08:00
<span><%= link_to reply.user.name, user_path(reply.user) %>:&nbsp;</span>
<span class="message-notes"> <%= reply.notes %></span>
2013-12-25 21:00:40 +08:00
<% ids = 'project_respond_form_'+ journal.id.to_s%>
2013-12-26 15:32:34 +08:00
<p>
2013-12-26 11:05:09 +08:00
<span class="time"><%= format_time reply.created_on %></span>
2013-12-26 15:32:34 +08:00
<span style="display: none; margin-left: 4px;" id=<%= ids_r %>>
<%= 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 => reply.user},
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "delete", :title => l(:button_delete)) if (User.current.id == reply.user_id) || journal.jour_id == User.current.id %></td>
<% end %>
2013-12-26 10:52:16 +08:00
</span>
2013-12-25 21:00:40 +08:00
</p>
2013-12-26 10:52:16 +08:00
</div>
2013-12-26 11:13:30 +08:00
<div id='<%=id%>' class="respond-form">
2013-12-25 21:00:40 +08:00
<%= render :partial => "words/new_respond", :locals => {:journal => journal, :m_reply_id => m_reply_id} %>
</div>
<div style="clear: both;"></div>
</li>