mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-09-16 07:45:55 +00:00
feat(UI): add package counter to repo/user/org overview pages
- add package counter to repo/user/org overview pages - add go unit tests for repo/user has/count packages - add many more unit tests for packages model - fix error for non-existing packages in DeletePackageByID and SetRepositoryLink
This commit is contained in:
parent
da97544fa0
commit
994bd93e69
8 changed files with 341 additions and 25 deletions
|
@ -24,6 +24,10 @@
|
|||
{{if and .IsPackageEnabled (or .ContextUser.IsIndividual .CanReadPackages)}}
|
||||
<a href="{{.ContextUser.HomeLink}}/-/packages" class="{{if .IsPackagesPage}}active {{end}}item">
|
||||
{{svg "octicon-package"}} {{ctx.Locale.Tr "packages.title"}}
|
||||
{{if .PackageCount}}
|
||||
<div class="ui small label">{{.PackageCount}}</div>
|
||||
{{end}}
|
||||
<span hidden test-name="package-count">{{.PackageCount}}</span>
|
||||
</a>
|
||||
{{end}}
|
||||
{{if and .IsRepoIndexerEnabled (or .ContextUser.IsIndividual .CanReadCode)}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue