parent
c9c3aa5f31
commit
d4be470e5f
|
@ -68,7 +68,7 @@ class AtController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def find_project(id)
|
def find_project(id)
|
||||||
return [] if id<0
|
return [] if id.to_i<0
|
||||||
at_persons = Project.find(id).users
|
at_persons = Project.find(id).users
|
||||||
at_persons.delete_if { |u| u.id == User.current.id }
|
at_persons.delete_if { |u| u.id == User.current.id }
|
||||||
end
|
end
|
||||||
|
|
|
@ -102,13 +102,15 @@ class OrgDocumentCommentsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
@org_document_comment = OrgDocumentComment.find(params[:id])
|
@org_document_comment = SubDocumentComment.find(params[:id])
|
||||||
org = @org_document_comment.organization
|
@sub_domain = @org_document_comment.sub_domain
|
||||||
if @org_document_comment.id == org.home_id
|
@org_subfield = @sub_domain.org_subfield
|
||||||
org.update_attributes(:home_id => nil)
|
# org = @org_document_comment.organization
|
||||||
end
|
# if @org_document_comment.id == org.home_id
|
||||||
if @org_document_comment.destroy
|
# org.update_attributes(:home_id => nil)
|
||||||
end
|
# end
|
||||||
|
@org_document_comment.destroy
|
||||||
|
# end
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js
|
format.js
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
//location.reload();
|
//location.reload();
|
||||||
<% if params[:detail_page] %>
|
<% if params[:detail_page] %>
|
||||||
window.location.href = '<%= organization_org_document_comments_path(:organization_id => @org_document_comment.root.organization_id)%>';
|
window.location.href = '<%= org_subfield_sub_domain_sub_document_comments_path(:org_subfield_id => @org_subfield.id, :sub_domain_id => @sub_domain.id)%>';
|
||||||
<% else %>
|
<% else %>
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
<% end %>
|
<% end %>
|
Loading…
Reference in New Issue