diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index 84df89dd..dc1d39e3 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -1174,7 +1174,7 @@ end def partners @menu_type = 6 @sub_type = 3 - @partners = Partner.includes(:school) + @partners = Partner.includes(:school).order("created_at desc") end def all_partners @@ -1219,6 +1219,7 @@ end school.save end render :json => {status: 1, message: "创建成功!"} + redirects_to partners_path end end @@ -1265,6 +1266,10 @@ end @members = paginateHelper @members, 8 end + def add_partner_member + + end + # check 部门 identifier是否重复 def check_depart_identifier logger.info("###############{params}") diff --git a/app/views/managements/_partner_addManage.html.erb b/app/views/managements/_partner_addManage.html.erb index 4f7e145f..4f2b9fad 100644 --- a/app/views/managements/_partner_addManage.html.erb +++ b/app/views/managements/_partner_addManage.html.erb @@ -34,7 +34,7 @@

- <%= form_for @partner, :url => add_depart_member_managements_path,:html => {:id => 'add_depart_member_form', :remote => true, :method => :post} do |f| %> + <%= form_for "", :url => add_partner_member_managements_path,:html => {:id => 'add_partner_member_form', :remote => true, :method => :post} do |f| %> <% @members.each do |member| %>

diff --git a/app/views/managements/partners.html.erb b/app/views/managements/partners.html.erb index 1d39b899..cf16ead1 100644 --- a/app/views/managements/partners.html.erb +++ b/app/views/managements/partners.html.erb @@ -21,7 +21,9 @@

管理员
@@ -65,10 +67,6 @@ pop_box_new(html,572,500); }) - $(".manageList").on("click",".addManage",function(){ - var html="<%= escape_javascript(render :partial => "managements/partner_addManage") %>"; - pop_box_new(html,572,500); - }) }) \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index b539fdf5..efc9756e 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -555,6 +555,7 @@ RedmineApp::Application.routes.draw do ## oauth相关 match 'departments', :via => [:get, :post] get 'partners' get 'add_partner_member_box' + post 'add_partner_member' get 'all_partners' post 'add_partner' delete 'delete_depart_member'