You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

orgs.go 1019B

12345678910111213141516171819202122232425262728293031323334
  1. // Copyright 2014 The Gogs Authors. All rights reserved.
  2. // Copyright 2020 The Gitea Authors.
  3. // Use of this source code is governed by a MIT-style
  4. // license that can be found in the LICENSE file.
  5. package admin
  6. import (
  7. "code.gitea.io/gitea/models"
  8. "code.gitea.io/gitea/modules/base"
  9. "code.gitea.io/gitea/modules/context"
  10. "code.gitea.io/gitea/modules/setting"
  11. "code.gitea.io/gitea/modules/structs"
  12. "code.gitea.io/gitea/routers"
  13. )
  14. const (
  15. tplOrgs base.TplName = "admin/org/list"
  16. )
  17. // Organizations show all the organizations
  18. func Organizations(ctx *context.Context) {
  19. ctx.Data["Title"] = ctx.Tr("admin.organizations")
  20. ctx.Data["PageIsAdmin"] = true
  21. ctx.Data["PageIsAdminOrganizations"] = true
  22. routers.RenderUserSearch(ctx, &models.SearchUserOptions{
  23. Type: models.UserTypeOrganization,
  24. ListOptions: models.ListOptions{
  25. PageSize: setting.UI.Admin.OrgPagingNum,
  26. },
  27. Visible: []structs.VisibleType{structs.VisibleTypePublic, structs.VisibleTypeLimited, structs.VisibleTypePrivate},
  28. }, tplOrgs)
  29. }