Merge pull request '[GITEA] Use correct tab value for repo search' (#1649) from Gusted/forgejo:forgejo-fix-stars-tab into forgejo-dependency

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/1649
This commit is contained in:
Gusted 2023-10-21 22:38:59 +00:00
commit be5bf3fb3b
2 changed files with 4 additions and 4 deletions

View file

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

View file

@ -20,7 +20,7 @@
{{template "user/dashboard/feeds" .}} {{template "user/dashboard/feeds" .}}
{{else if eq .TabName "stars"}} {{else if eq .TabName "stars"}}
<div class="stars"> <div class="stars">
{{template "explore/repo_search" .}} {{template "explore/repo_search" (dict "." . "tab" "stars")}}
{{template "explore/repo_list" .}} {{template "explore/repo_list" .}}
{{template "base/paginate" .}} {{template "base/paginate" .}}
</div> </div>
@ -31,7 +31,7 @@
{{else if eq .TabName "overview"}} {{else if eq .TabName "overview"}}
<div id="readme_profile" class="markup">{{.ProfileReadme | Str2html}}</div> <div id="readme_profile" class="markup">{{.ProfileReadme | Str2html}}</div>
{{else}} {{else}}
{{template "explore/repo_search" .}} {{template "explore/repo_search" (dict "ctxData" . "tab" "repositories")}}
{{template "explore/repo_list" .}} {{template "explore/repo_list" .}}
{{template "base/paginate" .}} {{template "base/paginate" .}}
{{end}} {{end}}