mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-28 04:06:18 +01:00
Revert "[UI] Revert "Remove ONLY_SHOW_RELEVANT_REPOS setting""
This reverts commit1681c51b7f
.347df0cbf0
changed the logic and made it different. I overlooked @gusted comment on the matter and also the fact that the CI was not reporting a failed status.
This commit is contained in:
parent
fa4f904868
commit
3f67fb2bb0
1 changed files with 3 additions and 6 deletions
|
@ -18,6 +18,7 @@ import (
|
|||
const (
|
||||
// tplExploreRepos explore repositories page template
|
||||
tplExploreRepos base.TplName = "explore/repos"
|
||||
relevantReposOnlyParam string = "no_filter"
|
||||
)
|
||||
|
||||
// RepoSearchOptions when calling search repositories
|
||||
|
@ -83,13 +84,9 @@ 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
|
||||
|
||||
|
@ -141,7 +138,7 @@ func RenderRepoSearch(ctx *context.Context, opts *RepoSearchOptions) {
|
|||
pager.SetDefaultParams(ctx)
|
||||
pager.AddParam(ctx, "topic", "TopicOnly")
|
||||
pager.AddParam(ctx, "language", "Language")
|
||||
pager.AddParamString("no_filter", ctx.FormString("no_filter"))
|
||||
pager.AddParamString(relevantReposOnlyParam, ctx.FormString(relevantReposOnlyParam))
|
||||
ctx.Data["Page"] = pager
|
||||
|
||||
ctx.HTML(http.StatusOK, opts.TplName)
|
||||
|
|
Loading…
Reference in a new issue