|
|
|
@ -38,6 +38,7 @@ func isKeywordValid(keyword string) bool {
|
|
|
|
|
|
|
|
|
|
// RenderUserSearch render user search page
|
|
|
|
|
func RenderUserSearch(ctx *context.Context, opts *user_model.SearchUserOptions, tplName base.TplName) { |
|
|
|
|
opts.PageSize = 8 * 1024 // Get all users
|
|
|
|
|
opts.Page = ctx.FormInt("page") |
|
|
|
|
if opts.Page <= 1 { |
|
|
|
|
opts.Page = 1 |
|
|
|
@ -102,13 +103,6 @@ func RenderUserSearch(ctx *context.Context, opts *user_model.SearchUserOptions,
|
|
|
|
|
ctx.Data["ShowUserEmail"] = setting.UI.ShowUserEmail |
|
|
|
|
ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled |
|
|
|
|
|
|
|
|
|
pager := context.NewPagination(int(count), 8 * 1024, opts.Page, 5) |
|
|
|
|
pager.SetDefaultParams(ctx) |
|
|
|
|
for paramKey, paramVal := range opts.ExtraParamStrings { |
|
|
|
|
pager.AddParamString(paramKey, paramVal) |
|
|
|
|
} |
|
|
|
|
ctx.Data["Page"] = pager |
|
|
|
|
|
|
|
|
|
ctx.HTML(http.StatusOK, tplName) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|