mirror of https://github.com/go-gitea/gitea
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 @kolaentepull/25762/head^2
parent
e0a780d75b
commit
6375419468
@ -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}} |
Loading…
Reference in new issue