]> source.dussan.org Git - gitea.git/commitdiff
Fix incorrect "tab" parameter for repo search sub-template (#27755)
authorwxiaoguang <wxiaoguang@gmail.com>
Tue, 24 Oct 2023 02:00:06 +0000 (10:00 +0800)
committerGitHub <noreply@github.com>
Tue, 24 Oct 2023 02:00:06 +0000 (02:00 +0000)
![image](https://github.com/go-gitea/gitea/assets/2114189/c546824e-4824-4f4d-bd33-e558c6ddf0ef)

![image](https://github.com/go-gitea/gitea/assets/2114189/713eb72c-22fb-412b-a867-9cccbf7548ec)

templates/explore/repo_search.tmpl

index 31b00d29e392025c036ff499e7aa8f2e8cbe4263..136d3f8e8197e362584ef342f554f064a577f9cf 100644 (file)
@@ -6,8 +6,8 @@
                        {{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true}}
                        {{if .PageIsExploreRepositories}}
                                <input type="hidden" name="only_show_relevant" value="{{.OnlyShowRelevant}}">
-                       {{else}}
-                               <input type="hidden" name="tab" value="repositories">
+                       {{else if .TabName}}
+                               <input type="hidden" name="tab" value="{{.TabName}}">
                        {{end}}
                        <button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button>
                </div>