diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index 0352d80f2..b75742164 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -1,5 +1,33 @@ # encoding: utf-8 class OrganizationsController < ApplicationController + + + helper :sort + include SortHelper + helper :custom_fields + include CustomFieldsHelper + include AvatarHelper + include WordsHelper + include GitlabHelper + include UserScoreHelper + + include PollHelper + helper :user_score + helper :journals + + # added by liuping 关注 + + helper :watchers + helper :activities + + ### added by william + include ActsAsTaggableOn::TagsHelper + + # fq + helper :words + helper :project_score + helper :issues + include UsersHelper before_filter :find_organization, :only => [:show, :members] layout 'base_org' def index @@ -27,12 +55,22 @@ 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 = paginateHelper @activities, 10 + @org_activities = OrgActivity.where('container_id =? and container_type =? ', + @organization.id, 'Organization ').order('updated_at desc').page(params[:page]).per(10) + @org_activities_count = OrgActivity.where('container_id =? and container_type =? ', + @organization.id, 'Organization ').order('updated_at desc').count + project_ids = @organization.projects.map(&:id) << 0 + @org_project_activties = ForgeActivity.where("project_id in (#{project_ids.join(',')}) and forge_act_type in('Issue','Message','ProjectCreateInfo')").order("updated_at desc").page(params[:page] || 1).per(10) + @org_project_activties_count = ForgeActivity.where('project_id in (?)',project_ids.join(',')).count + #@org_activities = paginateHelper @org_activities, 10 + @page = params[:page] else render_403 end + respond_to do |format| + format.html + format.js + end end def update @@ -99,4 +137,13 @@ class OrganizationsController < ApplicationController def members @members = OrgMember.where("organization_id =?", @organization.id) end + + def more_org_projects + @organization = Organization.find params[:id] + @page = params[:page] + @org_projects = @organization.org_projects.reorder('created_at').page((params[:page].to_i || 1) +1).per(5) + respond_to do |format| + format.js + end + end end diff --git a/app/helpers/organizations_helper.rb b/app/helpers/organizations_helper.rb index 55a7a5d42..607d2af5c 100644 --- a/app/helpers/organizations_helper.rb +++ b/app/helpers/organizations_helper.rb @@ -17,4 +17,6 @@ module OrganizationsHelper s + content_tag('ul', links,:class => 'wlist',:style=>'float:left !important', :id => "org_member_pagination_links" ) end + + end diff --git a/app/views/layouts/_org_projects.html.erb b/app/views/layouts/_org_projects.html.erb new file mode 100644 index 000000000..be65fd516 --- /dev/null +++ b/app/views/layouts/_org_projects.html.erb @@ -0,0 +1,12 @@ +<% projects.each do |project|%> + <% pro = Project.find project.project_id %> +
  • + <%= link_to pro.name, project_path(pro.id,:host=>Setting.host_name), :class => "coursesLineGrey hidden", :title => pro.name%> +
  • +<% end %> +<% if projects.size == 5%> +
  • + + +
  • +<% end%> \ No newline at end of file diff --git a/app/views/layouts/base_org.html.erb b/app/views/layouts/base_org.html.erb index 32ada4729..6b4eab72a 100644 --- a/app/views/layouts/base_org.html.erb +++ b/app/views/layouts/base_org.html.erb @@ -50,13 +50,9 @@ <% end %> <% end%> -
    组织id:<%= @organization.id %>
    - <% if User.current.admin_of_org?(@organization) %> - 配置 - <% end %> - -
    - <%= link_to l(:label_org_name)+"#{@organization.name}", organization_path(@organization.id), :class=>"pr_info_name fl c_dark fb break_word" %> + +
    + <%= link_to @organization.name, organization_path(@organization.id), :class=>"pr_info_name fl c_dark fb break_word" %> <% if @organization.is_public? %> <%= l(:label_public)%> <% else %> @@ -64,6 +60,19 @@ <% end %>
    + <% if User.current.admin_of_org?(@organization) %> + 配置 + <% end %> + + + + + + + + + +
    <%= link_to '文章', organization_org_document_comments_path(@organization) %> ( @@ -76,17 +85,18 @@
    <%= link_to "动态",organization_path(@organization), :class => "homepageMenuText" %>
    - - - - - - - - +
    项目 + +
    +
    +
      + <%= render :partial => 'layouts/org_projects',:locals=>{:projects=>@organization.org_projects.reorder('created_at').limit(5),:org_id=>@organization.id,:page=>1}%> + + + - - +
    +
    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/add_reply.js.erb b/app/views/org_document_comments/add_reply.js.erb index 930c8ebb0..5d54af2bf 100644 --- a/app/views/org_document_comments/add_reply.js.erb +++ b/app/views/org_document_comments/add_reply.js.erb @@ -1,3 +1,3 @@ -$("#organization_document_<%= @document.id %>").html(""); -$("#organization_document_<%= @document.id %>").html("<%= escape_javascript(render :partial => 'organizations/show_org_document', :locals => {:document => @document}) %>"); + +$("#organization_document_<%= @document.id %>").replaceWith("<%= escape_javascript(render :partial => 'organizations/show_org_document', :locals => {:document => @document}) %>"); init_activity_KindEditor_data(<%= @document.id %>,"","87%"); \ No newline at end of file diff --git a/app/views/org_document_comments/edit.html.erb b/app/views/org_document_comments/edit.html.erb index ffb04a4f9..b4f8662a3 100644 --- a/app/views/org_document_comments/edit.html.erb +++ b/app/views/org_document_comments/edit.html.erb @@ -21,6 +21,7 @@
    +
    <%= kindeditor_tag 'org_document_comment[content]',@org_document.content, :editor_id => 'org_document_description_editor', :height => "150px" %> diff --git a/app/views/org_document_comments/index.html.erb b/app/views/org_document_comments/index.html.erb index a7340c08a..d9b1d9579 100644 --- a/app/views/org_document_comments/index.html.erb +++ b/app/views/org_document_comments/index.html.erb @@ -16,12 +16,9 @@ <% @documents.each do |document| %> -
    <%= render :partial => 'organizations/show_org_document', :locals => {:document => document} %> -
    <% end %> <% end %> \ No newline at end of file diff --git a/app/views/organizations/_org_member_list.html.erb b/app/views/organizations/_org_member_list.html.erb index 0ac43d12e..f67b25811 100644 --- a/app/views/organizations/_org_member_list.html.erb +++ b/app/views/organizations/_org_member_list.html.erb @@ -34,8 +34,7 @@
    <% end %> - - <% if ( (User.current.id == member.organization.creator_id || member.roles[0].name == "orgManager" ) && member.user_id != member.organization.creator_id )%> + <% if ( (User.current.id == member.organization.creator_id || User.current.admin_of_org?(member.organization) ) && member.user_id != member.organization.creator_id )%> 编辑 <%= link_to '删除', org_member_path(member.id),:method=>'delete',:style=>'color: #0781B4;margin-left: 30px;float: left',:confirm=>'您确定要删除么?', :remote => true %><% end %>
    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/_org_project_activities.html.erb b/app/views/organizations/_org_project_activities.html.erb new file mode 100644 index 000000000..b46996661 --- /dev/null +++ b/app/views/organizations/_org_project_activities.html.erb @@ -0,0 +1,28 @@ +<% org_project_activties.each do |act|%> +<% if act %> + <% if act %> + <% case act.forge_act_type.to_s %> + <% when 'Issue' %> + <%= render :partial => 'organizations/org_project_issue', :locals => {:activity => act.forge_act,:user_activity_id =>act.id} %> + <% when 'Message' %> + <%= render :partial => 'organizations/project_message', :locals => {:activity => act.forge_act,:user_activity_id =>act.id} %> + <% when 'ProjectCreateInfo'%> + <%= render :partial => 'organizations/project_create', :locals => {:activity => act,:user_activity_id =>act.id} %> + <% end %> + <% end %> +<% end %> +<% end %> +<% if org_act_count == 10 || pro_act_count == 10 %> +
    展开更多<%=link_to "", organization_path(org,:page => page.to_i + 1),:id => "more_org_activities_link",:remote => "true",:class => "none" %>
    + <%#= link_to "点击展开更多",user_activities_path(@user.id,:type => type,:page => page),:id => "show_more_activities",:remote => "true",:class => "loadMore mt10 f_grey"%> +<% end%> + + + diff --git a/app/views/organizations/_org_project_issue.html.erb b/app/views/organizations/_org_project_issue.html.erb new file mode 100644 index 000000000..573429752 --- /dev/null +++ b/app/views/organizations/_org_project_issue.html.erb @@ -0,0 +1,136 @@ +
    +
    +
    + <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %> +
    +
    +
    + <% if activity.try(:author).try(:realname) == ' ' %> + <%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %> + <% else %> + <%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %> + <% end %> TO + <%= link_to activity.project.name.to_s+" | 项目问题", project_issues_path(activity.project), :class => "newsBlue ml15"%> +
    +
    + <%= link_to activity.subject.to_s, issue_path(activity), :class => "postGrey" %> + + <%#= get_issue_priority(activity.priority_id)[1] %> + +
    +
    +
    指派给   + <% unless activity.assigned_to_id.nil? %> + <% if activity.try(:assigned_to).try(:realname) == ' ' %> + <%= link_to activity.try(:assigned_to), user_path(activity.assigned_to_id), :class => "newsBlue mr15" %> + <% else %> + <%= link_to activity.try(:assigned_to).try(:realname), user_path(activity.assigned_to_id), :class => "newsBlue mr15" %> + <% end %> + <% end %> +
    +
    + 时间: + <%=format_time(activity.created_on) %> +
    +
    +
    +
    + <% if activity.description? %> + <%= textAreailizable activity, :description, :attachments => activity.attachments %> + <% end %> +
    +
    +
    + + +
    +
    + <% if activity.attachments.any? %> + <% activity.attachments.each do |attachment| %> +
    + + + <%= link_to_short_attachment attachment,:length=> 58, :class => 'link_file_a fl newsBlue', :download => true -%> + + <% if attachment.is_text? %> + <%= link_to image_tag('magnifier.png'), + :controller => 'attachments', + :action => 'show', + :id => attachment, + :class => 'fl', + :filename => attachment.filename %> + <% end %> + + ( + <%= number_to_human_size attachment.filesize %>) + + + <%= link_to h(truncate(attachment.author.name, length: 10, omission: '...')),user_path(attachment.author),:class => "c_orange" %>, + <%= format_time(attachment.created_on) %> + +
    + <% end %> + <% end %> +
    +
    +
    +
    + <% count = activity.journals.count %> +
    +
    +
    +
    回复(<%= count %>)
    +
    <%#= format_date(activity.updated_on) %>
    + <% if count > 3 %> + + <% end %> +
    + + <% replies_all_i = 0 %> + <% if count > 0 %> +
    +
      + <% activity.journals.reorder("created_on desc").each do |reply| %> + + <% replies_all_i=replies_all_i + 1 %> +
    • +
      + <%= link_to image_tag(url_to_avatar(reply.user), :width => "33", :height => "33"), user_path(reply.user_id), :alt => "用户头像" %> +
      +
      +
      + <% if reply.try(:user).try(:realname) == ' ' %> + <%= link_to reply.try(:user), user_path(reply.user_id), :class => "newsBlue mr10 f14" %> + <% else %> + <%= link_to reply.try(:user).try(:realname), user_path(reply.user_id), :class => "newsBlue mr10 f14" %> + <% end %> + <%= format_time(reply.created_on) %> +
      +
      + <% if reply.details.any? %> + <% details_to_strings(reply.details).each do |string| %> +

      <%= string %>

      + <% end %> + <% end %> +

      <%= reply.notes.nil? ? "" : reply.notes.html_safe %>

      +
      +
      +
      +
    • + <% end %> +
    +
    + <% end %> + + + +
    +
    diff --git a/app/views/organizations/_project_create.html.erb b/app/views/organizations/_project_create.html.erb new file mode 100644 index 000000000..d966d8e18 --- /dev/null +++ b/app/views/organizations/_project_create.html.erb @@ -0,0 +1,38 @@ +<% project = Project.find(activity.project_id) %> +<% user = User.find(project.user_id)%> +
    +
    +
    + <%= link_to image_tag(url_to_avatar(user), :width => "50", :height => "50"), user_path(user), :alt => "用户头像" %> +
    +
    +
    + <% if user.try(:realname) == ' ' %> + <%= link_to user, user_path(user), :class => "newsBlue mr15" %> + <% else %> + <%= link_to user.try(:realname), user_path(user), :class => "newsBlue mr15" %> + <% end %> + TO + <%= link_to project.to_s+" | 项目", project_path(project.id,:host=>Setting.host_course), :class => "newsBlue ml15" %> +
    +
    + <%= link_to project.name, project_path(project.id,:host=>Setting.host_course), :class => "postGrey" %> +
    +
    + 创建时间:<%= format_time(project.created_on) %> +
    + +
    +
    +
    +
    \ No newline at end of file diff --git a/app/views/organizations/_project_message.html.erb b/app/views/organizations/_project_message.html.erb new file mode 100644 index 000000000..85ed08f2f --- /dev/null +++ b/app/views/organizations/_project_message.html.erb @@ -0,0 +1,100 @@ +
    +
    +
    + <%= link_to image_tag(url_to_avatar(activity.author), :width => "50", :height => "50"), user_path(activity.author_id), :alt => "用户头像" %> +
    +
    +
    + <% if activity.try(:author).try(:realname) == ' ' %> + <%= link_to activity.try(:author), user_path(activity.author_id), :class => "newsBlue mr15" %> + <% else %> + <%= link_to activity.try(:author).try(:realname), user_path(activity.author_id), :class => "newsBlue mr15" %> + <% end %> + TO + <%= link_to activity.project.name.to_s+" | 项目讨论区",project_boards_path(activity.project), :class => "newsBlue ml15 mr5"%> + +
    +
    + <% if activity.parent_id.nil? %> + <%= link_to activity.subject.to_s.html_safe, project_boards_path(activity.project,:parent_id =>activity.id, :topic_id => activity.id), :class=> "postGrey" + %> + <% else %> + <%= link_to activity.parent.subject.to_s.html_safe, project_boards_path(activity.project,:parent_id =>activity.parent_id, :topic_id => activity.id), :class=> "postGrey" + %> + <% end %> +
    +
    + 时间:<%= format_time(activity.created_on) %> +
    +
    +
    + <% if activity.parent_id.nil? %> + <%= activity.content.to_s.html_safe%> + <% else %> + <%= activity.parent.content.to_s.html_safe%> + <% end %> +
    +
    +
    + + +
    +
    +
    +
    + <% count = 0 %> + <% if activity.parent %> + <% count=activity.parent.children.count%> + <% else %> + <% count=activity.children.count%> + <% end %> +
    +
    +
    +
    回复( + <%=count %> + )
    +
    <%#=format_date(activity.updated_on)%>
    + <%if count>3 %> + + <% end %> +
    + + <% activity= activity.parent_id.nil? ? activity : activity.parent %> + <% replies_all_i = 0 %> + <% if count > 0 %> +
    +
      + <% activity.children.reorder("created_on desc").each do |reply| %> + + <% replies_all_i=replies_all_i+1 %> +
    • +
      + <%= link_to image_tag(url_to_avatar(reply.author), :width => "33", :height => "33"), user_path(reply.author_id), :alt => "用户头像" %> +
      +
      +
      + <% if reply.try(:author).try(:realname) == ' ' %> + <%= link_to reply.try(:author), user_path(reply.author_id), :class => "newsBlue mr10 f14" %> + <% else %> + <%= link_to reply.try(:author).try(:realname), user_path(reply.author_id), :class => "newsBlue mr10 f14" %> + <% end %> + <%= format_time(reply.created_on) %> +
      +
      + <%= reply.content.html_safe %>
      +
      +
      +
    • + <% end %> +
    +
    + <% end %> + + +
    +
    \ No newline at end of file diff --git a/app/views/organizations/_show_org_document.html.erb b/app/views/organizations/_show_org_document.html.erb index f1c633320..4177c3688 100644 --- a/app/views/organizations/_show_org_document.html.erb +++ b/app/views/organizations/_show_org_document.html.erb @@ -1,75 +1,76 @@ -
    -
    -
    - <%= link_to image_tag(url_to_avatar(User.find(document.creator_id)), :width => 45, :heigth => 45), user_path(document.creator_id) %> -
    -
    -
    - <%= link_to User.find(document.creator_id), user_path(document.creator.id), :class => "newsBlue mr15" %> - TO  <%= link_to document.organization.name, organization_path(document.organization), :class => "newsBlue" %> | - <% if defined?(home_id) %> - 首页 - <% else %> - 组织 - <% end %> +
    +
    +
    + <%= link_to image_tag(url_to_avatar(User.find(document.creator_id)), :width => 45, :heigth => 45), user_path(document.creator_id) %>
    -
    <%= document.title %>
    -
    - 发布时间:<%= format_activity_day(document.created_at) %> <%= format_time(document.created_at, false) %>
    - <% unless document.content.blank? %> -
    - <%= document.content.html_safe %> -
    - <% end %> - - <% if User.current.admin? || User.current.admin_of_org?(Organization.find(document.organization_id) || User.current.id == document.creator_id) %> -
    -
      -
    • -
        -
      • - <%= form_for('new_form',:url => {:controller => 'organizations',:action => 'set_homepage',:id => document.organization_id, :home_id => document.id},:method => "put",:remote => true) do |f|%> - 设为首页 - <% end %> -
      • -
      • - <%= link_to "编辑文章", edit_org_document_comment_path(:id => document.id, :organization_id => document.organization_id), :class => "postOptionLink" %> -
      • -
      • - <%= link_to "删除文章", org_document_comment_path(:id => document.id, :organization_id => document.organization_id), :method => 'delete', - :data => {:confirm => l(:text_are_you_sure)}, - :remote => true, :class => 'postOptionLink' %> -
      • -
      -
    • -
    -
    -
    -
    -
    - <% end %> -<% comments_for_doc = document.children.reorder("created_at desc") %> -<% count = document.children.count() %> - -
    -
    -
    回复(<%= count %>)
    - <% if count > 3 %> - - <% end %> + <% if User.current.admin? || User.current.admin_of_org?(Organization.find(document.organization_id) || User.current.id == document.creator_id) %> +
    +
      +
    • +
        +
      • + <%= form_for('new_form', :url => {:controller => 'organizations', :action => 'set_homepage', :id => document.organization_id, :home_id => document.id}, :method => "put", :remote => true) do |f| %> + 设为首页 + <% end %> +
      • +
      • + <%= link_to "编辑文章", edit_org_document_comment_path(:id => document.id, :organization_id => document.organization_id), :class => "postOptionLink" %> +
      • +
      • + <%= link_to "删除文章", org_document_comment_path(:id => document.id, :organization_id => document.organization_id), :method => 'delete', + :data => {:confirm => l(:text_are_you_sure)}, + :remote => true, :class => 'postOptionLink' %> +
      • +
      +
    • +
    +
    +
    + <% end %> +
    -
    + <% comments_for_doc = document.children.reorder("created_at desc") %> + <% count = document.children.count() %> + +
    +
    +
    回复(<%= count %>)
    + <% if count > 3 %> + + <% end %> +
    +
      <% reply_id = 0 %> <% comments_for_doc.each do |comment| %> <% reply_id += 1 %> -
    • +
    • <%= link_to image_tag(url_to_avatar(User.find(comment.creator_id)), :width => 33, :height => 33, :alt => "用户头像"), user_path(comment.creator_id) %>
      @@ -87,12 +88,12 @@
      - <%=link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33", :alt => "用户头像"), user_path(User.current) %> + <%= link_to image_tag(url_to_avatar(User.current), :width => "33", :height => "33", :alt => "用户头像"), user_path(User.current) %>
      <%= form_for('new_form', :url => add_reply_org_document_comment_path(:id => document.id), :method => "post", :remote => true) do |f| %> - +
      @@ -110,15 +111,15 @@
      -
      + <%= render :partial => 'show_org_document', :locals => {:document => OrgDocumentComment.find(@organization.home_id), :home_id => @organization.home_id} %> -
      <% end %> - <% unless @activities.nil? %> - <% @activities.each do |act| %> + <% unless @org_activities.nil? %> + <% @org_activities.each do |act| %> <% if act.org_act_type == 'CreateOrganization' %>
      @@ -52,20 +51,29 @@
      <% end %> - <% if act.org_act_type == 'OrgDocumentComment' %> + <% if act.org_act_type == 'OrgDocumentComment' && act.org_act_id != @organization.home_id %> -
      <%= render :partial => 'show_org_document', :locals => {:document => act.org_act} %> -
      <% end %> <% end %> -
        - <%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%> -
      + + <%#= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => false, :flag => true%> + <% end %> + <%# @org_project_activties.each do |org_act|%> + <%= render :partial => 'organizations/org_project_activities', + :locals => {:org_project_activties =>@org_project_activties, + :page=>@page, + :org => @organization, + :org_act_count=>@org_activities.count, + :pro_act_count=>@org_project_activties.count}%> + <%# end %> + + + diff --git a/app/views/organizations/show.js.erb b/app/views/organizations/show.js.erb new file mode 100644 index 000000000..b0a447910 --- /dev/null +++ b/app/views/organizations/show.js.erb @@ -0,0 +1,7 @@ +$("#show_more_activities").replaceWith("<%= escape_javascript( render :partial => 'organizations/org_project_activities', + :locals => {:org_project_activties =>@org_project_activties, + :page=>@page, + :org => @organization, + :org_act_count=>@org_activities.count, + :pro_act_count=>@org_project_activties.count} )%>"); + 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| %> diff --git a/config/routes.rb b/config/routes.rb index 5cb42fd58..0f05c3521 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -37,6 +37,7 @@ RedmineApp::Application.routes.draw do get 'clear_org_avatar_temp' put 'set_homepage' get 'members' + get 'more_org_projects' end collection do get 'check_uniq' diff --git a/db/schema.rb b/db/schema.rb index 272db1944..9b9e16eab 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 20151113025751) do +ActiveRecord::Schema.define(:version => 20151112072948) do create_table "activities", :force => true do |t| t.integer "act_id", :null => false diff --git a/public/javascripts/org.js b/public/javascripts/org.js index f74277a9e..e26995931 100644 --- a/public/javascripts/org.js +++ b/public/javascripts/org.js @@ -1,4 +1,4 @@ -//֯Աύ +//�����֯��Ա���ύ���� function submit_add_org_members(){ $("#org_member_add_form").submit(); } @@ -31,4 +31,15 @@ function observeSearchfield(fieldId, targetId, url) { var timer = setInterval(check, 300); $this.bind('keyup click mousemove', reset); }); +} + +//显示更多的项目 +function show_more_org_project(url){ + $.get( + url, + { page: $("#org_project_page_num").val() }, + function (data) { + + } + ); } \ No newline at end of file