summaryrefslogtreecommitdiffstats
path: root/routers/web/org/home.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/web/org/home.go')
-rw-r--r--routers/web/org/home.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/routers/web/org/home.go b/routers/web/org/home.go
index cf23a1e291..d07e2993b2 100644
--- a/routers/web/org/home.go
+++ b/routers/web/org/home.go
@@ -83,6 +83,9 @@ func Home(ctx *context.Context) {
keyword := ctx.FormTrim("q")
ctx.Data["Keyword"] = keyword
+ language := ctx.FormTrim("language")
+ ctx.Data["Language"] = language
+
page := ctx.FormInt("page")
if page <= 0 {
page = 1
@@ -103,6 +106,7 @@ func Home(ctx *context.Context) {
OrderBy: orderBy,
Private: ctx.IsSigned,
Actor: ctx.User,
+ Language: language,
IncludeDescription: setting.UI.SearchRepoDescription,
})
if err != nil {
@@ -148,6 +152,7 @@ func Home(ctx *context.Context) {
pager := context.NewPagination(int(count), setting.UI.User.RepoPagingNum, page, 5)
pager.SetDefaultParams(ctx)
+ pager.AddParam(ctx, "language", "Language")
ctx.Data["Page"] = pager
ctx.HTML(http.StatusOK, tplOrgHome)