orgs.go 860 B

1234567891011121314151617181920212223242526272829303132
  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/modules/base"
  8. "github.com/gogits/gogs/modules/context"
  9. "github.com/gogits/gogs/modules/setting"
  10. "github.com/gogits/gogs/routers"
  11. )
  12. const (
  13. ORGS base.TplName = "admin/org/list"
  14. )
  15. func Organizations(ctx *context.Context) {
  16. ctx.Data["Title"] = ctx.Tr("admin.organizations")
  17. ctx.Data["PageIsAdmin"] = true
  18. ctx.Data["PageIsAdminOrganizations"] = true
  19. routers.RenderUserSearch(ctx, &routers.UserSearchOptions{
  20. Type: models.USER_TYPE_ORGANIZATION,
  21. Counter: models.CountOrganizations,
  22. Ranger: models.Organizations,
  23. PageSize: setting.AdminOrgPagingNum,
  24. OrderBy: "id ASC",
  25. TplName: ORGS,
  26. })
  27. }