1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

New admin organization UI

This commit is contained in:
Antoine GIRARD
2015-09-25 19:54:52 +02:00
parent 1c35380c2c
commit c98dad1cf3
5 changed files with 92 additions and 68 deletions

View File

@@ -184,11 +184,10 @@ func CountOrganizations() int64 {
return count
}
// GetOrganizations returns given number of organizations with offset.
func GetOrganizations(num, offset int) ([]*User, error) {
orgs := make([]*User, 0, num)
err := x.Limit(num, offset).Where("type=1").Asc("id").Find(&orgs)
return orgs, err
// Organizations returns number of organizations in given page.
func Organizations(page, pageSize int) ([]*User, error) {
orgs := make([]*User, 0, pageSize)
return orgs, x.Limit(pageSize, (page-1)*pageSize).Where("type=1").Asc("id").Find(&orgs)
}
// DeleteOrganization completely and permanently deletes everything of organization.