diff options
author | Zettat123 <zettat123@gmail.com> | 2023-02-25 03:11:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-24 19:11:31 +0000 |
commit | 347df0cbf0f8aa7ce4714b818a61e423cd47f398 (patch) | |
tree | dbeb0154c53466a01b12b1761fc391c0996cd651 /routers/web/admin/repos.go | |
parent | 9eb61b77acecfb8702dfee287690c4b7329e60fc (diff) | |
download | gitea-347df0cbf0f8aa7ce4714b818a61e423cd47f398.tar.gz gitea-347df0cbf0f8aa7ce4714b818a61e423cd47f398.zip |
Show empty repos in Admin Repository Management page (#23114)
The **Admin Repository Management** page and the **Explore Repository**
page both use the `RenderRepoSearch` function. In this function, the
`OnlyShowRelevant` search option is `true` when querying repositories
for admin page.
https://github.com/go-gitea/gitea/blob/edf98a2dc30956c8e04b778bb7f1ce55c14ba963/routers/web/explore/repo.go#L99-L115
Refer to
[#19361](https://github.com/go-gitea/gitea/pull/19361/files#diff-8058dfb85557010e0592d586675ec62ce406af7068e6311f39c160deac37f149R497),
the repositories with `is_empty=true` will be hidden if
`OnlyShowRelevant` is `true`.
Administrators should be able to see all repositories. So
`OnlyShowRelevant` shouldn't be set to `true` .
---------
Co-authored-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'routers/web/admin/repos.go')
-rw-r--r-- | routers/web/admin/repos.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/routers/web/admin/repos.go b/routers/web/admin/repos.go index dc5432c549..1c4754f6d8 100644 --- a/routers/web/admin/repos.go +++ b/routers/web/admin/repos.go @@ -33,9 +33,10 @@ func Repos(ctx *context.Context) { ctx.Data["PageIsAdminRepositories"] = true explore.RenderRepoSearch(ctx, &explore.RepoSearchOptions{ - Private: true, - PageSize: setting.UI.Admin.RepoPagingNum, - TplName: tplRepos, + Private: true, + PageSize: setting.UI.Admin.RepoPagingNum, + TplName: tplRepos, + OnlyShowRelevant: false, }) } |