Browse Source

Все пользователи видны на карте #77

pull/93/head
parent
commit
a1f7db70d1
  1. 8
      routers/web/map/umap.go

8
routers/web/map/umap.go

@ -38,6 +38,7 @@ func isKeywordValid(keyword string) bool {
// RenderUserSearch render user search page // RenderUserSearch render user search page
func RenderUserSearch(ctx *context.Context, opts *user_model.SearchUserOptions, tplName base.TplName) { func RenderUserSearch(ctx *context.Context, opts *user_model.SearchUserOptions, tplName base.TplName) {
opts.PageSize = 8 * 1024 // Get all users
opts.Page = ctx.FormInt("page") opts.Page = ctx.FormInt("page")
if opts.Page <= 1 { if opts.Page <= 1 {
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["ShowUserEmail"] = setting.UI.ShowUserEmail
ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled 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) ctx.HTML(http.StatusOK, tplName)
} }

Loading…
Cancel
Save