1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-22 08:42:32 -05:00
forgejo/templates/repo/code/recently_pushed_new_branches.tmpl

18 lines
762 B
Go HTML Template
Raw Normal View History

{{range .RecentlyPushedNewBranches}}
<div class="ui positive message tw-flex tw-items-center tw-gap-2">
<div class="tw-flex-1 tw-break-anywhere">
2023-09-25 08:42:40 -04:00
{{$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}}