orgs.go 804 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/routers"
  10. )
  11. const (
  12. ORGS = "admin/org/list"
  13. )
  14. func Organizations(ctx *context.Context) {
  15. ctx.Data["Title"] = ctx.Tr("admin.organizations")
  16. ctx.Data["PageIsAdmin"] = true
  17. ctx.Data["PageIsAdminOrganizations"] = true
  18. routers.RenderUserSearch(ctx, &routers.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. }