mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-08 08:04:21 +00:00
[UI] Revert "Remove ONLY_SHOW_RELEVANT_REPOS setting"
This commit is contained in:
parent
28fab82302
commit
1681c51b7f
|
@ -17,8 +17,7 @@ import (
|
|||
|
||||
const (
|
||||
// tplExploreRepos explore repositories page template
|
||||
tplExploreRepos base.TplName = "explore/repos"
|
||||
relevantReposOnlyParam string = "no_filter"
|
||||
tplExploreRepos base.TplName = "explore/repos"
|
||||
)
|
||||
|
||||
// RepoSearchOptions when calling search repositories
|
||||
|
@ -84,9 +83,13 @@ func RenderRepoSearch(ctx *context.Context, opts *RepoSearchOptions) {
|
|||
default:
|
||||
ctx.Data["SortType"] = "recentupdate"
|
||||
orderBy = db.SearchOrderByRecentUpdated
|
||||
onlyShowRelevant = setting.UI.OnlyShowRelevantRepos && !ctx.FormBool("no_filter")
|
||||
}
|
||||
|
||||
keyword := ctx.FormTrim("q")
|
||||
if keyword != "" {
|
||||
onlyShowRelevant = false
|
||||
}
|
||||
|
||||
ctx.Data["OnlyShowRelevant"] = opts.OnlyShowRelevant
|
||||
|
||||
|
@ -138,7 +141,7 @@ func RenderRepoSearch(ctx *context.Context, opts *RepoSearchOptions) {
|
|||
pager.SetDefaultParams(ctx)
|
||||
pager.AddParam(ctx, "topic", "TopicOnly")
|
||||
pager.AddParam(ctx, "language", "Language")
|
||||
pager.AddParamString(relevantReposOnlyParam, ctx.FormString(relevantReposOnlyParam))
|
||||
pager.AddParamString("no_filter", ctx.FormString("no_filter"))
|
||||
ctx.Data["Page"] = pager
|
||||
|
||||
ctx.HTML(http.StatusOK, opts.TplName)
|
||||
|
|
Loading…
Reference in a new issue