Платформа ЦРНП "Мирокод" для разработки проектов
https://git.mirocod.ru
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.
34 lines
1.1 KiB
34 lines
1.1 KiB
2 years ago
|
package explore
|
||
|
|
||
|
import (
|
||
|
"code.gitea.io/gitea/models/db"
|
||
|
user_model "code.gitea.io/gitea/models/user"
|
||
|
"code.gitea.io/gitea/modules/base"
|
||
|
"code.gitea.io/gitea/modules/context"
|
||
|
"code.gitea.io/gitea/modules/setting"
|
||
|
"code.gitea.io/gitea/modules/structs"
|
||
|
"code.gitea.io/gitea/modules/util"
|
||
|
)
|
||
|
|
||
|
const (
|
||
|
tplExploreInterests base.TplName = "explore/interests"
|
||
|
)
|
||
|
|
||
|
func Interests(ctx *context.Context) {
|
||
|
ctx.Data["UsersIsDisabled"] = setting.Service.Explore.DisableUsersPage
|
||
|
ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled
|
||
|
ctx.Data["Title"] = ctx.Tr("explore")
|
||
|
ctx.Data["PageIsExplore"] = true
|
||
|
ctx.Data["PageIsExploreInterests"] = true
|
||
|
|
||
|
RenderUserSearch(ctx, &user_model.SearchUserOptions{
|
||
|
Actor: ctx.User,
|
||
|
Type: user_model.UserTypeIdentity,
|
||
|
ListOptions: db.ListOptions{PageSize: setting.UI.ExplorePagingNum},
|
||
|
IsActive: util.OptionalBoolTrue,
|
||
|
Visible: []structs.VisibleType{structs.VisibleTypePublic, structs.VisibleTypeLimited, structs.VisibleTypePrivate},
|
||
|
Kind: user_model.ByInterest,
|
||
|
}, tplExploreInterests)
|
||
|
|
||
|
}
|