diff --git a/app/controllers/organizations_controller.rb b/app/controllers/organizations_controller.rb index 5f823ee3d..fdd12030f 100644 --- a/app/controllers/organizations_controller.rb +++ b/app/controllers/organizations_controller.rb @@ -100,4 +100,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/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 %> +
<%= render :partial => 'organizations/show_org_document', :locals => {:document => document} %> -
<% 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 @@ -+ <%= render :partial => 'show_org_document', :locals => {:document => OrgDocumentComment.find(@organization.home_id), :home_id => @organization.home_id} %> -
<% end %> <% unless @activities.nil? %> @@ -52,15 +51,13 @@<%= render :partial => 'show_org_document', :locals => {:document => act.org_act} %> -
<% end %> <% end %>