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 %>
|
2015-07-18 13:41:17 +08:00
|
|
|
<%= image_tag url_to_avatar(reply.user),:width => '30',:height => '30' %>
|
2014-12-05 16:02:26 +08:00
|
|
|
<% else %>
|
2015-03-24 19:51:03 +08:00
|
|
|
<%= image_tag url_to_avatar(nil),:width => '30',:height => '30' %>
|
2014-12-05 16:02:26 +08:00
|
|
|
<% end %>
|
|
|
|
</div>
|
2015-07-10 14:24:11 +08:00
|
|
|
<div class="recall_con f14">
|
2014-12-05 16:02:26 +08:00
|
|
|
<% id = 'project_respond_form_'+ reply.id.to_s %>
|
2016-06-01 15:35:26 +08:00
|
|
|
<%= link_to reply.user.show_name, user_path(reply.user) %>
|
2015-07-10 16:47:19 +08:00
|
|
|
<%= l(:label_reply_to)%>
|
|
|
|
<% if show_name %>
|
2016-06-01 15:35:26 +08:00
|
|
|
<%= link_to parent_jour.user.show_name, user_path(parent_jour.user) %>
|
2014-12-05 16:02:26 +08:00
|
|
|
<% else %>
|
2015-07-10 16:47:19 +08:00
|
|
|
<%= l(:label_anonymous) %>
|
2014-12-05 16:02:26 +08:00
|
|
|
<% end %>
|
2016-05-24 09:11:50 +08:00
|
|
|
<div id="reply_<%= reply.id %>">
|
|
|
|
<p>
|
|
|
|
<%= reply.notes.html_safe %>
|
|
|
|
</p>
|
|
|
|
</div>
|
2016-05-27 17:06:34 +08:00
|
|
|
<script type="text/javascript">
|
|
|
|
$(function(){
|
|
|
|
showNormalImage('reply__<%= reply.id %>');
|
|
|
|
autoUrl('reply_<%= reply.id %>');
|
|
|
|
});
|
|
|
|
</script>
|
2015-06-26 16:27:55 +08:00
|
|
|
<div class="cl"></div>
|
2015-03-26 17:41:25 +08:00
|
|
|
<span class="c_grey fl">
|
2014-10-28 17:22:35 +08:00
|
|
|
<%= format_time reply.created_on %>
|
|
|
|
</span>
|
2015-07-10 16:47:19 +08:00
|
|
|
<div class="ping_disfoot" style="display: none; margin-left: 4px;" id='<%=ids_r%>' >
|
2016-05-25 16:20:01 +08:00
|
|
|
<span id="reply_praise_count_<%=reply.id %>">
|
|
|
|
<%=render :partial=> "praise_tread/praise", :locals => {:activity=>reply, :user_activity_id=>reply.id,:type=>"reply"}%>
|
|
|
|
</span>
|
2015-07-10 16:47:19 +08:00
|
|
|
<% if User.current.admin? || reply.user.id == User.current.id || allow_delete%>
|
|
|
|
<%= link_to(l(:label_newfeedback_delete), {:controller => 'words', :action => 'destroy', :object_id => reply, :user_id => reply.user},
|
|
|
|
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "delete", :title => l(:button_delete)) %>
|
|
|
|
<% end %>
|
|
|
|
<% if reply_allow %>
|
|
|
|
<%#= link_to l(:button_reply),'',
|
2015-06-11 16:24:09 +08:00
|
|
|
{:focus => 'project_respond',:nhname=>"reply_btn", :onclick => "toggleAndSettingWordsVal($('##{id}'), $('##{id} textarea'), ''); return false;"} %>
|
2015-07-10 16:47:19 +08:00
|
|
|
<%= link_to l(:button_reply),'javascript:;',{:nhname=>"reply_btn"} %>
|
|
|
|
<% end %> <!-- #{l(:label_reply_plural)} #{m_reply_id.user.name}: -->
|
|
|
|
</div>
|
2015-03-26 17:41:25 +08:00
|
|
|
<div class="cl"></div>
|
|
|
|
<div id='<%=id%>' class="respond-form">
|
|
|
|
<% if reply_allow %>
|
2015-04-27 17:25:42 +08:00
|
|
|
<% if journal.jour_type == "Course" || journal.jour_type == "Project" %>
|
2015-03-26 17:41:25 +08:00
|
|
|
<%= render :partial => "words/new_respond_course", :locals => {:journal => journal, :m_reply_id => m_reply_id,:show_name => show_name} %>
|
|
|
|
<% else %>
|
|
|
|
<%= render :partial => "words/new_respond", :locals => {:journal => journal, :m_reply_id => m_reply_id,:show_name => show_name} %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</div>
|
2014-12-05 16:02:26 +08:00
|
|
|
</div>
|
2015-03-26 17:41:25 +08:00
|
|
|
<div class="cl"></div>
|
2014-12-05 16:02:26 +08:00
|
|
|
</div>
|
2016-05-24 09:11:50 +08:00
|
|
|
<% end %>
|