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} %> -

+

<% end %> <% end %> \ No newline at end of file diff --git a/app/views/organizations/_org_members.html.erb b/app/views/organizations/_org_members.html.erb index 8719ad275..3940a6576 100644 --- a/app/views/organizations/_org_members.html.erb +++ b/app/views/organizations/_org_members.html.erb @@ -1,11 +1,11 @@ <%= stylesheet_link_tag 'courses' %> -
+

组织成员

- 加入时间 +
<% members.each do |member| %> diff --git a/app/views/organizations/new.html.erb b/app/views/organizations/new.html.erb index 08311d51b..1ab3ad933 100644 --- a/app/views/organizations/new.html.erb +++ b/app/views/organizations/new.html.erb @@ -31,7 +31,7 @@
  • - (打钩为公开,不打钩则不公开,若不公开,仅项目成员可见该项目。) + (打钩为公开,不打钩则不公开,若不公开,仅组织成员可见该组织。)
  • diff --git a/app/views/organizations/show.html.erb b/app/views/organizations/show.html.erb index 5f1d0e003..e77cc7d09 100644 --- a/app/views/organizations/show.html.erb +++ b/app/views/organizations/show.html.erb @@ -30,9 +30,9 @@ init_activity_KindEditor_data(<%= @organization.home_id%>, null, "87%"); }); -
    +

    <%= render :partial => 'show_org_document', :locals => {:document => OrgDocumentComment.find(@organization.home_id), :home_id => @organization.home_id} %> -

    +

    <% end %> <% unless @activities.nil? %> @@ -58,9 +58,9 @@ init_activity_KindEditor_data(<%= act.org_act.id%>, null, "87%"); }); -
    +

    <%= render :partial => 'show_org_document', :locals => {:document => act.org_act} %> -

    +

    <% end %> <% end %>
      diff --git a/app/views/users/_user_homework_form.html.erb b/app/views/users/_user_homework_form.html.erb index 0baf31ab2..efaed2d9d 100644 --- a/app/views/users/_user_homework_form.html.erb +++ b/app/views/users/_user_homework_form.html.erb @@ -17,12 +17,16 @@
      <%= link_to("导入作业", user_import_homeworks_user_path(User.current.id,:select_course => defined?(select_course)),:class => "BlueCirBtn fl mr10",:remote => true) unless edit_mode%> - -
      + <% if edit_mode %> + + <% end %> +
      <%= calendar_for('homework_end_time')%>
      - + <% if edit_mode %> + + <% end %>
      <%= calendar_for('homework_publish_time')%> diff --git a/app/views/users/user_organizations.html.erb b/app/views/users/user_organizations.html.erb index ec66358f5..50fa03bbe 100644 --- a/app/views/users/user_organizations.html.erb +++ b/app/views/users/user_organizations.html.erb @@ -6,10 +6,10 @@
      组织列表 -
      - - -
      + + + +
      <% @orgs.each do |org| %>