mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 19:38:23 +00:00 
			
		
		
		
	This commit adds the "You recently pushed to branch X" alert also to PR overview, as opposed to only the repository's home page. GitHub also shows this alert on the PR list, as well as the home page. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io>
		
			
				
	
	
		
			19 lines
		
	
	
		
			705 B
		
	
	
	
		
			Handlebars
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			705 B
		
	
	
	
		
			Handlebars
		
	
	
	
	
	
| {{/* 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.CommitTime}}
 | |
| 			{{$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}}
 |