Merge pull request #1165 from c7io-dev/patch2

Fix admin/user pagination
develop
Matt Baer 6 days ago committed by GitHub
commit 4504617c1a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      admin.go

@ -208,7 +208,7 @@ func handleViewAdminUsers(app *App, u *User, w http.ResponseWriter, r *http.Requ
p.Flashes, _ = getSessionFlashes(app, w, r, nil)
p.TotalUsers = app.db.GetAllUsersCount()
ttlPages := p.TotalUsers / adminUsersPerPage
ttlPages := (p.TotalUsers - 1) / adminUsersPerPage + 1
p.TotalPages = []int{}
for i := 1; i <= int(ttlPages); i++ {
p.TotalPages = append(p.TotalPages, i)

Loading…
Cancel
Save