orgs.go 912 B

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright 2015 - Present, The Gogs Authors. All rights reserved.
  2. // Copyright 2018 - Present, Gitote. All rights reserved.
  3. //
  4. // This source code is licensed under the MIT license found in the
  5. // LICENSE file in the root directory of this source tree.
  6. package admin
  7. import (
  8. "gitote/gitote/models"
  9. "gitote/gitote/pkg/context"
  10. "gitote/gitote/pkg/setting"
  11. "gitote/gitote/routes"
  12. )
  13. const (
  14. // OrgsTPL list page template
  15. OrgsTPL = "admin/org/list"
  16. )
  17. // Organizations shows organizations page
  18. func Organizations(c *context.Context) {
  19. c.Data["Title"] = "Organizations"
  20. c.Data["PageIsAdmin"] = true
  21. c.Data["PageIsAdminOrganizations"] = true
  22. routes.RenderUserSearch(c, &routes.UserSearchOptions{
  23. Type: models.UserTypeOrganization,
  24. Counter: models.CountOrganizations,
  25. Ranger: models.Organizations,
  26. PageSize: setting.UI.Admin.OrgPagingNum,
  27. OrderBy: "id ASC",
  28. TplName: OrgsTPL,
  29. })
  30. }