mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-14 11:48:09 -05:00
57647abc24
Fixes: https://github.com/go-gitea/gitea/issues/30063 <img width="1301" alt="Screenshot 2024-05-30 at 14 43 24" src="https://github.com/go-gitea/gitea/assets/115237/00443af0-088d-49a5-be9e-8c9adcc2c01d"> (cherry picked from commit 1f8ac27b31b52791396f198b665a1d6bbdcfd8b3)
17 lines
762 B
Go HTML Template
17 lines
762 B
Go HTML Template
{{range .RecentlyPushedNewBranches}}
|
|
<div class="ui positive message tw-flex tw-items-center tw-gap-2">
|
|
<div class="tw-flex-1 tw-break-anywhere">
|
|
{{$timeSince := TimeSince .CommitTime.AsTime ctx.Locale}}
|
|
{{$repo := .GetRepo $.Context}}
|
|
{{$name := .Name}}
|
|
{{if ne $repo.ID $.Repository.ID}}
|
|
{{$name = (print $repo.FullName ":" .Name)}}
|
|
{{end}}
|
|
{{$branchLink := (print ($repo.Link) "/src/branch/" (PathEscapeSegments .Name))}}
|
|
{{ctx.Locale.Tr "repo.pulls.recently_pushed_new_branches" $name $timeSince $branchLink}}
|
|
</div>
|
|
<a role="button" class="ui compact positive button tw-m-0" href="{{$.Repository.ComposeBranchCompareURL $.Repository.BaseRepo $name}}">
|
|
{{ctx.Locale.Tr "repo.pulls.compare_changes"}}
|
|
</a>
|
|
</div>
|
|
{{end}}
|