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.
35 lines
1.0 KiB
35 lines
1.0 KiB
10 years ago
|
// Copyright 2014 The Gogs Authors. All rights reserved.
|
||
5 years ago
|
// Copyright 2020 The Gitea Authors.
|
||
10 years ago
|
// Use of this source code is governed by a MIT-style
|
||
|
// license that can be found in the LICENSE file.
|
||
|
|
||
|
package admin
|
||
|
|
||
|
import (
|
||
8 years ago
|
"code.gitea.io/gitea/models"
|
||
|
"code.gitea.io/gitea/modules/base"
|
||
|
"code.gitea.io/gitea/modules/context"
|
||
|
"code.gitea.io/gitea/modules/setting"
|
||
5 years ago
|
"code.gitea.io/gitea/modules/structs"
|
||
3 years ago
|
"code.gitea.io/gitea/routers/web/explore"
|
||
10 years ago
|
)
|
||
|
|
||
|
const (
|
||
8 years ago
|
tplOrgs base.TplName = "admin/org/list"
|
||
10 years ago
|
)
|
||
|
|
||
8 years ago
|
// Organizations show all the organizations
|
||
9 years ago
|
func Organizations(ctx *context.Context) {
|
||
9 years ago
|
ctx.Data["Title"] = ctx.Tr("admin.organizations")
|
||
10 years ago
|
ctx.Data["PageIsAdmin"] = true
|
||
|
ctx.Data["PageIsAdminOrganizations"] = true
|
||
|
|
||
3 years ago
|
explore.RenderUserSearch(ctx, &models.SearchUserOptions{
|
||
5 years ago
|
Type: models.UserTypeOrganization,
|
||
|
ListOptions: models.ListOptions{
|
||
|
PageSize: setting.UI.Admin.OrgPagingNum,
|
||
|
},
|
||
|
Visible: []structs.VisibleType{structs.VisibleTypePublic, structs.VisibleTypeLimited, structs.VisibleTypePrivate},
|
||
7 years ago
|
}, tplOrgs)
|
||
10 years ago
|
}
|