帖子详情页面添加删除功能

This commit is contained in:
huang 2016-05-06 15:02:38 +08:00
parent ae298f9b55
commit 526fe8ff13
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
//location.reload();
<% if params[:detail_page] %>
window.location.href = '<%= org_subfield_sub_domain_sub_document_comments_path(@subdomain, :org_subfield_id => @org_subfield.id)%>';
window.location.href = '<%= org_subfield_sub_domain_sub_document_comments_path(:org_subfield_id => @org_subfield.id, :sub_domain_id => @subdomain.id)%>';
<% else %>
window.location.reload();
<% end %>

View File

@ -53,7 +53,7 @@
<%= link_to "编辑文章", edit_org_subfield_sub_domain_sub_document_comment_path(@document, :org_subfield_id=> params[:org_subfield_id], :sub_domain_id => @document.sub_domain.id, :flag => 1), :class => "postOptionLink" %>
</li>
<li>
<%= link_to "删除文章", org_document_comment_path(:id => @document.id, :organization_id => @organization.id, :detail_page => 1), :method => 'delete',
<%= link_to "删除文章", org_subfield_sub_domain_sub_document_comment_path(@document, :org_subfield_id=> params[:org_subfield_id], :sub_domain_id => @document.sub_domain.id, :detail_page => 1), :method => 'delete',
:data => {:confirm => l(:text_are_you_sure)},
:remote => true, :class => 'postOptionLink' %>
</li>