删除管理员

dev_local
cxt 6 years ago
parent 0b76986075
commit 13aa9f7df6

@ -1354,6 +1354,16 @@ end
end
end
# 合作伙伴删除管理员
def delete_partner_member
if params[:partner] && params[:partner_member]
@partner = Partner.find_by_id params[:partner]
user = User.find_by_id params[:partner_member]
user.update_attributes(partner_id: nil) if !@partner.nil? && !user.nil?
end
end
# check 部门 identifier是否重复
def check_depart_identifier
logger.info("###############{params}")

@ -0,0 +1 @@
$("#partner_member_list").html("<%= j(render :partial => "partner_member_list", :locals => {partner: @partner}) %>")

@ -68,11 +68,5 @@
$(".partnerList li a").removeClass("active");
$(this).addClass("active");
})
$(".removeImg").on("click",function(){
$(this).parents("li").remove();
})
})
</script>

@ -556,6 +556,7 @@ RedmineApp::Application.routes.draw do ## oauth相关
get 'partners'
get 'add_partner_member_box'
post 'add_partner_member'
delete 'delete_partner_member'
get 'get_partner'
get 'all_partners'
post 'add_partner'

Loading…
Cancel
Save