parent
ed27b6e30f
commit
9beb8acb99
|
@ -280,11 +280,11 @@ class ProjectsController < ApplicationController
|
||||||
|
|
||||||
# 根据私密性,取出符合条件的所有数据
|
# 根据私密性,取出符合条件的所有数据
|
||||||
if User.current.member_of?(@project) || User.current.admin?
|
if User.current.member_of?(@project) || User.current.admin?
|
||||||
@events_pages = ForgeActivity.where("project_id = ?",@project).order("created_at desc").page(params['page'|| 1]).per(20);
|
@events_pages = ForgeActivity.where("project_id = ? and forge_act_type != ?",@project, "Document" ).order("created_at desc").page(params['page'|| 1]).per(20);
|
||||||
#events = @activity.events(@date_from, @date_to)
|
#events = @activity.events(@date_from, @date_to)
|
||||||
else
|
else
|
||||||
@events_pages = ForgeActivity.includes(:project).where("forge_activities.project_id = ? and projects.is_public
|
@events_pages = ForgeActivity.includes(:project).where("forge_activities.project_id = ? and projects.is_public
|
||||||
= ?",@project,1).order("created_at desc")
|
= ? and forge_act_type != ? ",@project,1, "Document").order("created_at desc")
|
||||||
.page(params['page'|| 1]).per(10);
|
.page(params['page'|| 1]).per(10);
|
||||||
# @events = @activity.events(@date_from, @date_to, :is_public => 1)
|
# @events = @activity.events(@date_from, @date_to, :is_public => 1)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue