orgs.go 758 B

12345678910111213141516171819202122232425262728293031
  1. // Copyright 2014 The Gogs Authors. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package admin
  5. import (
  6. "gogs.io/gogs/internal/context"
  7. "gogs.io/gogs/internal/db"
  8. "gogs.io/gogs/internal/route"
  9. "gogs.io/gogs/internal/setting"
  10. )
  11. const (
  12. ORGS = "admin/org/list"
  13. )
  14. func Organizations(c *context.Context) {
  15. c.Data["Title"] = c.Tr("admin.organizations")
  16. c.Data["PageIsAdmin"] = true
  17. c.Data["PageIsAdminOrganizations"] = true
  18. route.RenderUserSearch(c, &route.UserSearchOptions{
  19. Type: db.USER_TYPE_ORGANIZATION,
  20. Counter: db.CountOrganizations,
  21. Ranger: db.Organizations,
  22. PageSize: setting.UI.Admin.OrgPagingNum,
  23. OrderBy: "id ASC",
  24. TplName: ORGS,
  25. })
  26. }