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

orgs.go 946 B

9 years ago
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. "code.gitea.io/gitea/models"
  7. "code.gitea.io/gitea/modules/base"
  8. "code.gitea.io/gitea/modules/context"
  9. "code.gitea.io/gitea/modules/setting"
  10. "code.gitea.io/gitea/modules/structs"
  11. "code.gitea.io/gitea/routers"
  12. )
  13. const (
  14. tplOrgs base.TplName = "admin/org/list"
  15. )
  16. // Organizations show all the organizations
  17. func Organizations(ctx *context.Context) {
  18. ctx.Data["Title"] = ctx.Tr("admin.organizations")
  19. ctx.Data["PageIsAdmin"] = true
  20. ctx.Data["PageIsAdminOrganizations"] = true
  21. routers.RenderUserSearch(ctx, &models.SearchUserOptions{
  22. Type: models.UserTypeOrganization,
  23. PageSize: setting.UI.Admin.OrgPagingNum,
  24. Visible: []structs.VisibleType{structs.VisibleTypePublic, structs.VisibleTypeLimited, structs.VisibleTypePrivate},
  25. }, tplOrgs)
  26. }