orgs.go 649 B

123456789101112131415161718192021222324252627282930
  1. package admin
  2. import (
  3. "gitote/gitote/models"
  4. "gitote/gitote/pkg/context"
  5. "gitote/gitote/pkg/setting"
  6. "gitote/gitote/routes"
  7. )
  8. const (
  9. // ORGS list page template
  10. ORGS = "admin/org/list"
  11. )
  12. // Organizations shows organizations page
  13. func Organizations(c *context.Context) {
  14. c.Data["Title"] = "Organizations"
  15. c.Data["PageIsAdmin"] = true
  16. c.Data["PageIsAdminOrganizations"] = true
  17. routes.RenderUserSearch(c, &routes.UserSearchOptions{
  18. Type: models.USER_TYPE_ORGANIZATION,
  19. Counter: models.CountOrganizations,
  20. Ranger: models.Organizations,
  21. PageSize: setting.UI.Admin.OrgPagingNum,
  22. OrderBy: "id ASC",
  23. TplName: ORGS,
  24. })
  25. }