Forks repository list page follow other repositories page (#34784)

Replace #24130 

Before:


![image](https://github.com/user-attachments/assets/98c39bce-bdbf-4fc1-b476-527c5139e01f)

After:

![image](https://github.com/user-attachments/assets/65fef5b8-63b9-4283-b8ea-2ac2f27cb001)
This commit is contained in:
Lunny Xiao
2025-06-22 03:27:25 +08:00
committed by GitHub
parent 0548c10293
commit ddd1e6ca83
12 changed files with 26 additions and 27 deletions

View File

@@ -151,6 +151,7 @@ func Repos(ctx *context.Context) {
ctx.Data["CodePageIsDisabled"] = setting.Service.Explore.DisableCodePage
ctx.Data["Title"] = ctx.Tr("explore")
ctx.Data["PageIsExplore"] = true
ctx.Data["ShowRepoOwnerOnList"] = true
ctx.Data["PageIsExploreRepositories"] = true
ctx.Data["IsRepoIndexerEnabled"] = setting.Indexer.RepoIndexerEnabled

View File

@@ -394,9 +394,10 @@ func Forks(ctx *context.Context) {
}
pager := context.NewPagination(int(total), pageSize, page, 5)
ctx.Data["ShowRepoOwnerAvatar"] = true
ctx.Data["ShowRepoOwnerOnList"] = true
ctx.Data["Page"] = pager
ctx.Data["Forks"] = forks
ctx.Data["Repos"] = forks
ctx.HTML(http.StatusOK, tplForks)
}

View File

@@ -197,6 +197,7 @@ func prepareUserProfileTabData(ctx *context.Context, profileDbRepo *repo_model.R
total = int(count)
case "stars":
ctx.Data["PageIsProfileStarList"] = true
ctx.Data["ShowRepoOwnerOnList"] = true
repos, count, err = repo_model.SearchRepository(ctx, repo_model.SearchRepoOptions{
ListOptions: db.ListOptions{
PageSize: pagingNum,