mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Newly pushed branches hints on repository home page (#25715)
This PR will display a pull request creation hint on the repository home page when there are newly created branches with no pull request. Only the recent 6 hours and 2 updated branches will be displayed. Inspired by #14003 Replace #14003 Resolves #311 Resolves #13196 Resolves #23743 co-authored by @kolaente
This commit is contained in:
11
templates/repo/code/recently_pushed_new_branches.tmpl
Normal file
11
templates/repo/code/recently_pushed_new_branches.tmpl
Normal file
@@ -0,0 +1,11 @@
|
||||
{{range .RecentlyPushedNewBranches}}
|
||||
<div class="ui positive message gt-df gt-ac">
|
||||
<div class="gt-f1">
|
||||
{{$timeSince := TimeSince .UpdatedUnix.AsTime $.locale}}
|
||||
{{$.locale.Tr "repo.pulls.recently_pushed_new_branches" (PathEscapeSegments .Name) $timeSince | Safe}}
|
||||
</div>
|
||||
<a aria-role="button" class="ui compact positive button gt-m-0" href="{{$.Repository.ComposeBranchCompareURL $.Repository.BaseRepo (PathEscapeSegments .Name)}}">
|
||||
{{$.locale.Tr "repo.pulls.compare_changes"}}
|
||||
</a>
|
||||
</div>
|
||||
{{end}}
|
Reference in New Issue
Block a user