2014-12-05 16:02:26 +08:00
|
|
|
<% parent_jour = JournalsForMessage.where("id = #{reply.m_reply_id}").first %>
|
2014-12-24 09:30:45 +08:00
|
|
|
<% allow_delete ||= false %>
|
2014-12-05 16:02:26 +08:00
|
|
|
<% if parent_jour%>
|
|
|
|
<% reply_allow = JournalsForMessage.create_by_user? User.current %>
|
|
|
|
<% ids_r = 'reply_respond_form_'+ reply.id.to_s %>
|
|
|
|
<div class="recall" id='word_li_<%=reply.id.to_s%>' onmouseover="$('#<%= ids_r %>').show()" onmouseout="$('#<%= ids_r %>').hide()">
|
|
|
|
<div class="recall_head">
|
|
|
|
<% if show_name %>
|
|
|
|
<%= image_tag url_to_avatar(reply.user) %>
|
|
|
|
<% else %>
|
|
|
|
<%= image_tag url_to_avatar(nil) %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<div class="recall_con">
|
|
|
|
<% id = 'project_respond_form_'+ reply.id.to_s %>
|
|
|
|
<%= link_to reply.user.name, user_path(reply.user) %>
|
|
|
|
回复
|
|
|
|
<% if show_name %>
|
2014-11-26 16:29:17 +08:00
|
|
|
<%= link_to parent_jour.user.name, user_path(parent_jour.user) %>
|
2014-12-05 16:02:26 +08:00
|
|
|
<% else %>
|
2014-11-04 14:49:36 +08:00
|
|
|
<%= l(:label_anonymous) %>
|
2014-12-05 16:02:26 +08:00
|
|
|
<% end %>
|
2014-11-04 14:49:36 +08:00
|
|
|
|
2014-11-02 12:12:41 +08:00
|
|
|
<p>
|
2014-10-28 17:22:35 +08:00
|
|
|
<span class="message-notes">
|
|
|
|
<%= reply.notes %>
|
|
|
|
</span>
|
2014-12-05 16:02:26 +08:00
|
|
|
</p>
|
|
|
|
<p>
|
2014-10-28 17:22:35 +08:00
|
|
|
<span class="time">
|
|
|
|
<%= format_time reply.created_on %>
|
|
|
|
</span>
|
2014-11-02 12:12:41 +08:00
|
|
|
<span class="ping_disfoot" style="display: none; margin-left: 4px;" id='<%=ids_r%>' >
|
2014-12-24 09:30:45 +08:00
|
|
|
<% if User.current.admin? || reply.user.id == User.current.id || allow_delete%>
|
2014-10-28 17:22:35 +08:00
|
|
|
<%= link_to(l(:label_newfeedback_delete), {:controller => 'words', :action => 'destroy', :object_id => reply, :user_id => reply.user},
|
2014-12-05 16:02:26 +08:00
|
|
|
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "delete", :title => l(:button_delete)) %>
|
2014-10-28 17:22:35 +08:00
|
|
|
<% end %>
|
2014-12-05 16:02:26 +08:00
|
|
|
<% if reply_allow %>
|
2014-11-02 12:12:41 +08:00
|
|
|
<%= link_to l(:label_projects_feedback_respond),'',
|
2014-11-04 14:49:36 +08:00
|
|
|
{:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{id}'), $('##{id} textarea'), ''); return false;"} %>
|
|
|
|
<% end %> <!-- #{l(:label_reply_plural)} #{m_reply_id.user.name}: -->
|
2014-10-28 17:22:35 +08:00
|
|
|
</span>
|
2014-12-05 16:02:26 +08:00
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
<div id='<%=id%>' class="respond-form">
|
2014-10-28 17:22:35 +08:00
|
|
|
<% if reply_allow %>
|
2014-11-26 16:29:17 +08:00
|
|
|
<%= render :partial => "words/new_respond", :locals => {:journal => journal, :m_reply_id => m_reply_id,:show_name => show_name} %>
|
2014-10-28 17:22:35 +08:00
|
|
|
<% end %>
|
2014-12-05 16:02:26 +08:00
|
|
|
</div>
|
|
|
|
<div style="clear: both;"></div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|