diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2024-11-17 19:06:25 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-18 03:06:25 +0000 |
commit | 4f879a00df029e09b40f64bf8de0572704766115 (patch) | |
tree | bb6d9b0b70fdc1d4e92e298355f244f52e831930 /templates/repo | |
parent | f122aaf9ff627515922a68782339725e2d7c079a (diff) | |
download | gitea-4f879a00df029e09b40f64bf8de0572704766115.tar.gz gitea-4f879a00df029e09b40f64bf8de0572704766115.zip |
Refactor find forks and fix possible bugs that weak permissions check (#32528)
- Move models/GetForks to services/FindForks
- Add doer as a parameter of FindForks to check permissions
- Slight performance optimization for get forks API with batch loading
of repository units
- Add tests for forking repository to organizations
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Diffstat (limited to 'templates/repo')
-rw-r--r-- | templates/repo/forks.tmpl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/templates/repo/forks.tmpl b/templates/repo/forks.tmpl index 412c59b60e..725b67c651 100644 --- a/templates/repo/forks.tmpl +++ b/templates/repo/forks.tmpl @@ -5,12 +5,14 @@ <h2 class="ui dividing header"> {{ctx.Locale.Tr "repo.forks"}} </h2> + <div class="flex-list"> {{range .Forks}} - <div class="tw-flex tw-items-center tw-py-2"> - <span class="tw-mr-1">{{ctx.AvatarUtils.Avatar .Owner}}</span> - <a href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a> / <a href="{{.Link}}">{{.Name}}</a> + <div class="flex-item tw-border-0 repo-fork-item"> + <span>{{ctx.AvatarUtils.Avatar .Owner}}</span> + <span><a href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a> / <a href="{{.Link}}">{{.Name}}</a></span> </div> {{end}} + </div> </div> {{template "base/paginate" .}} |