We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent af7f08b commit dc8774eCopy full SHA for dc8774e
routers/home.go
@@ -132,6 +132,7 @@ func RenderRepoSearch(ctx *context.Context, opts *RepoSearchOptions) {
132
133
keyword := strings.Trim(ctx.Query("q"), " ")
134
topicOnly := ctx.QueryBool("topic")
135
+ ctx.Data["TopicOnly"] = topicOnly
136
137
repos, count, err = models.SearchRepository(&models.SearchRepoOptions{
138
Page: page,
@@ -155,6 +156,7 @@ func RenderRepoSearch(ctx *context.Context, opts *RepoSearchOptions) {
155
156
157
pager := context.NewPagination(int(count), opts.PageSize, page, 5)
158
pager.SetDefaultParams(ctx)
159
+ pager.AddParam(ctx, "topic", "TopicOnly")
160
ctx.Data["Page"] = pager
161
162
ctx.HTML(200, opts.TplName)
0 commit comments