修改留言的父级留言删除后,页面报错的BUG
This commit is contained in:
parent
4b11e78b89
commit
1706fffb4b
|
@ -1,49 +1,51 @@
|
|||
<% 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) %>
|
||||
回复
|
||||
<% parent_jour = JournalsForMessage.find reply.m_reply_id %>
|
||||
<% if show_name && parent_jour %>
|
||||
<% parent_jour = JournalsForMessage.where("id = #{reply.m_reply_id}").first %>
|
||||
<% 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 %>
|
||||
<%= link_to parent_jour.user.name, user_path(parent_jour.user) %>
|
||||
<% else %>
|
||||
<% else %>
|
||||
<%= l(:label_anonymous) %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
||||
<p>
|
||||
<span class="message-notes">
|
||||
<%= reply.notes %>
|
||||
</span>
|
||||
</p>
|
||||
<p>
|
||||
</p>
|
||||
<p>
|
||||
<span class="time">
|
||||
<%= format_time reply.created_on %>
|
||||
</span>
|
||||
<span class="ping_disfoot" style="display: none; margin-left: 4px;" id='<%=ids_r%>' >
|
||||
<% if User.current.admin? || reply.user.id == User.current.id %>
|
||||
<% if User.current.admin? || reply.user.id == User.current.id%>
|
||||
<%= 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)) %>
|
||||
:remote => true, :confirm => l(:text_are_you_sure), :method => 'delete', :class => "delete", :title => l(:button_delete)) %>
|
||||
<% end %>
|
||||
<% if reply_allow %>
|
||||
<% if reply_allow %>
|
||||
<%= link_to l(:label_projects_feedback_respond),'',
|
||||
{:focus => 'project_respond', :onclick => "toggleAndSettingWordsVal($('##{id}'), $('##{id} textarea'), ''); return false;"} %>
|
||||
<% end %> <!-- #{l(:label_reply_plural)} #{m_reply_id.user.name}: -->
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
<div id='<%=id%>' class="respond-form">
|
||||
</p>
|
||||
</div>
|
||||
<div id='<%=id%>' class="respond-form">
|
||||
<% if reply_allow %>
|
||||
<%= render :partial => "words/new_respond", :locals => {:journal => journal, :m_reply_id => m_reply_id,:show_name => show_name} %>
|
||||
<% end %>
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="clear: both;"></div>
|
||||
</div>
|
||||
<% end %>
|
Loading…
Reference in New Issue