diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index 0352d80f2..5f823ee3d 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -27,8 +27,9 @@ class OrganizationsController < ApplicationController def show if @organization.is_public? || User.current.admin? || User.current.member_of_org?(@organization) @organization = Organization.find(params[:id]) - @activities = OrgActivity.where('(org_act_id = ? and org_act_type = ?) || (container_id =? and org_act_type =? and org_act_id !=?)', - @organization.id, 'CreateOrganization ', @organization.id, 'OrgDocumentComment', @organization.home_id).order('updated_at desc') + @activities = OrgActivity.where('container_id =? and container_type =? ', + @organization.id, 'Organization ').order('updated_at desc') + @activities = paginateHelper @activities, 10 else render_403 diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb index 3bf109f37..be178607f 100644 --- a/app/views/my/account.html.erb +++ b/app/views/my/account.html.erb @@ -581,7 +581,10 @@ } }); - + //查询学校 + $("input[name='province']").on('input', function (e) { + throttle(shcool_search_fn,window,e); + }); function throttle(method,context,e){ clearTimeout(method.tId); @@ -603,10 +606,7 @@ type: 'post', success: function (data) { schoolsResult = data.schools; - count = data.count; //查询学校 - $("input[name='province']").on('input', function (e) { - throttle(shcool_search_fn,window,e); - }); + count = data.count; maxPage = Math.ceil(count/100) //最大页码值 if(schoolsResult.length != undefined && schoolsResult.length != 0) { var i = 0; diff --git a/app/views/org_document_comments/index.html.erb b/app/views/org_document_comments/index.html.erb index a7340c08a..a636b2ec8 100644 --- a/app/views/org_document_comments/index.html.erb +++ b/app/views/org_document_comments/index.html.erb @@ -20,8 +20,8 @@ init_activity_KindEditor_data(<%= document.id%>, null, "87%"); }); -
<%= render :partial => 'organizations/show_org_document', :locals => {:document => document} %> -
<%= render :partial => 'show_org_document', :locals => {:document => OrgDocumentComment.find(@organization.home_id), :home_id => @organization.home_id} %> -
<%= render :partial => 'show_org_document', :locals => {:document => act.org_act} %> -