1
1
mirror of https://github.com/go-gitea/gitea.git synced 2026-03-17 20:15:56 +01:00
gitea/templates/repo/code/recently_pushed_new_branches.tmpl
Lunny Xiao 3422318545
Fix push time bug (#36693) (#36713)
When display or search branch's pushed time, we should use
`updated_unix` rather than `commit_time`.

Fix #36633
Backport #36693

Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: silverwind <me@silverwind.io>
2026-02-22 22:27:40 +01:00

19 lines
705 B
Go HTML Template

{{/* Template Attributes:
* RecentBranchesPromptData
*/}}
{{$data := .RecentBranchesPromptData}}
{{if $data}}
{{range $recentBranch := $data.RecentlyPushedNewBranches}}
<div class="ui positive message flex-text-block">
<div class="tw-flex-1">
{{$timeSince := DateUtils.TimeSince $recentBranch.PushedTime}}
{{$branchLink := HTMLFormat `<a href="%s">%s</a>` $recentBranch.BranchLink .BranchDisplayName}}
{{ctx.Locale.Tr "repo.pulls.recently_pushed_new_branches" $branchLink $timeSince}}
</div>
<a role="button" class="ui compact green button" href="{{QueryBuild $recentBranch.BranchCompareURL "expand" 1}}">
{{ctx.Locale.Tr "repo.pulls.compare_changes"}}
</a>
</div>
{{end}}
{{end}}