forked from forgejo/forgejo
Refactor admin user filter query parameters (#18965)
Only pass `status_filter` on admin page Use a more general method to pass query parameters, remove hard-coded keys
This commit is contained in:
parent
a14b6f3aae
commit
dd712b77f7
4 changed files with 14 additions and 11 deletions
|
@ -82,7 +82,9 @@ func RenderUserSearch(ctx *context.Context, opts *user_model.SearchUserOptions,
|
|||
|
||||
pager := context.NewPagination(int(count), opts.PageSize, opts.Page, 5)
|
||||
pager.SetDefaultParams(ctx)
|
||||
pager.SetUserFilterParams(ctx)
|
||||
for paramKey, paramVal := range opts.ExtraParamStrings {
|
||||
pager.AddParamString(paramKey, paramVal)
|
||||
}
|
||||
ctx.Data["Page"] = pager
|
||||
|
||||
ctx.HTML(http.StatusOK, tplName)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue