diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index b9a44e7d..3040c347 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -1174,6 +1174,7 @@ end def partners @menu_type = 6 @sub_type = 3 +<<<<<<< HEAD @partners = Partner.includes(:school) @limit = 10 @page = params['page'] || 1 @@ -1181,6 +1182,9 @@ end @total_pages = (@partners_count / 10.0).ceil @partners = paginateHelper @partners, @limit +======= + @partners = Partner.includes(:school).order("created_at desc") +>>>>>>> 0aec53dda74a8e3e3ac8c0f2cd70e38a65bfecbe end def all_partners @@ -1223,6 +1227,7 @@ end school.save end render :json => {status: 1, message: "创建成功!"} + redirects_to partners_path end end @@ -1257,6 +1262,22 @@ end end end + # 添加合作伙伴管理员- 弹框 + def add_partner_member_box + @partner = Partner.first + @members = + if params[:search] + User.where("LOWER(concat(lastname, firstname, nickname, mail)) LIKE '%#{params[:search]}%'") + else + User.where(:certification => 1) + 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 818a4777..94e3ba0b 100644 --- a/app/views/managements/_partner_addManage.html.erb +++ b/app/views/managements/_partner_addManage.html.erb @@ -1,29 +1,9 @@
- 姓名: - 单位: -
- -@@ -33,24 +13,22 @@ 手机号
- - - - - 学生 - 湖北工业大学 - 156****9087 -
-- - - - - 学生 - 湖北工业大学 - -
+ + <%= form_for "", :url => add_partner_member_managements_path,:html => {:id => 'add_partner_member_form', :remote => true, :method => :post} do |f| %> + <% @members.each do |member| %> ++ + + + + <%= member.identity %> + <%= member.school_name %> + <%= member.phone %> +
+ <% end %> + <% end %> + +