mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-21 04:05:45 +08:00
分页的部分修改
This commit is contained in:
@@ -21,11 +21,8 @@ class IssuesController < ApplicationController
|
||||
@assign_to_me_size = issues.where(assigned_to_id: current_user&.id).size
|
||||
@my_published_size = issues.where(author_id: current_user&.id).size
|
||||
scopes = Issues::ListQueryService.call(issues,params)
|
||||
|
||||
@page = params[:page]
|
||||
@limit = params[:limit] || 15
|
||||
@issues_size = scopes.size
|
||||
@issues = scopes.page(@page).per(@limit)
|
||||
@issues = paginate(scopes)
|
||||
|
||||
respond_to do |format|
|
||||
format.json
|
||||
|
||||
@@ -19,11 +19,8 @@ class PullRequestsController < ApplicationController
|
||||
@user_admin_or_member = current_user.present? && (current_user.admin || @project.member?(current_user))
|
||||
|
||||
scopes = Issues::ListQueryService.call(issues,params)
|
||||
|
||||
@page = params[:page]
|
||||
@limit = params[:limit] || 15
|
||||
@issues_size = scopes.size
|
||||
@issues = scopes.page(@page).per(@limit)
|
||||
@issues = paginate(scopes)
|
||||
end
|
||||
|
||||
def new
|
||||
|
||||
Reference in New Issue
Block a user