orgs.go 789 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. "github.com/gogits/gogs/models"
  7. "github.com/gogits/gogs/pkg/context"
  8. "github.com/gogits/gogs/pkg/setting"
  9. "github.com/gogits/gogs/routes"
  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. routes.RenderUserSearch(c, &routes.UserSearchOptions{
  19. Type: models.USER_TYPE_ORGANIZATION,
  20. Counter: models.CountOrganizations,
  21. Ranger: models.Organizations,
  22. PageSize: setting.UI.Admin.OrgPagingNum,
  23. OrderBy: "id ASC",
  24. TplName: ORGS,
  25. })
  26. }