forked from Trustie/forgeplus
项目列表language_id支持分页
This commit is contained in:
parent
7e5d426af9
commit
8cb64e9a51
|
|
@ -47,7 +47,7 @@ class ProjectsController < ApplicationController
|
|||
# 默认查询时count性能问题处理
|
||||
not_category_count = Project.where(project_category_id: nil).count
|
||||
ProjectCategory.sum("projects_count") - Project.visible.joins("left join organization_extensions on organization_extensions.organization_id = projects.user_id").where("organization_extensions.visibility =2").count + not_category_count
|
||||
elsif params[:search].present? || params[:topic_id].present? || params[:topic_name].present?
|
||||
elsif params[:search].present? || params[:topic_id].present? || params[:topic_name].present? || params[:language_id].present?
|
||||
@projects.total_count
|
||||
else
|
||||
cate = ProjectCategory.find_by(id: category_id)
|
||||
|
|
|
|||
Loading…
Reference in New Issue