Filter Repositories by type (#29231)
Filter Repositories by type (resolves #1170, #1318) before:  after:  (cherry picked from commit e3524c63d6d42865ea8288af89b372544d35474b)
This commit is contained in:
parent
a39f69ac28
commit
83e04328df
15 changed files with 200 additions and 79 deletions
|
@ -85,6 +85,21 @@ func Home(ctx *context.Context) {
|
|||
page = 1
|
||||
}
|
||||
|
||||
archived := ctx.FormOptionalBool("archived")
|
||||
ctx.Data["IsArchived"] = archived
|
||||
|
||||
fork := ctx.FormOptionalBool("fork")
|
||||
ctx.Data["IsFork"] = fork
|
||||
|
||||
mirror := ctx.FormOptionalBool("mirror")
|
||||
ctx.Data["IsMirror"] = mirror
|
||||
|
||||
template := ctx.FormOptionalBool("template")
|
||||
ctx.Data["IsTemplate"] = template
|
||||
|
||||
private := ctx.FormOptionalBool("private")
|
||||
ctx.Data["IsPrivate"] = private
|
||||
|
||||
var (
|
||||
repos []*repo_model.Repository
|
||||
count int64
|
||||
|
@ -102,6 +117,11 @@ func Home(ctx *context.Context) {
|
|||
Actor: ctx.Doer,
|
||||
Language: language,
|
||||
IncludeDescription: setting.UI.SearchRepoDescription,
|
||||
Archived: archived,
|
||||
Fork: fork,
|
||||
Mirror: mirror,
|
||||
Template: template,
|
||||
IsPrivate: private,
|
||||
})
|
||||
if err != nil {
|
||||
ctx.ServerError("SearchRepository", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue