mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 11:28:24 +00:00 
			
		
		
		
	Follow #33127 Fix #8649, fix #639 This is a complete solution. A repo unit could be set to: * Anonymous read (non-signed-in user) * Everyone read (signed-in user) * Everyone write (wiki-only)
		
			
				
	
	
		
			20 lines
		
	
	
		
			889 B
		
	
	
	
		
			Handlebars
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			889 B
		
	
	
	
		
			Handlebars
		
	
	
	
	
	
| {{$canReadCode := $.Permission.CanRead ctx.Consts.RepoUnitTypeCode}}
 | |
| 
 | |
| <div class="ui fluid vertical menu">
 | |
| 	{{/* the default activity page "pulse" could work with any permission: code, issue, pr, release*/}}
 | |
| 	<a class="{{if .PageIsPulse}}active {{end}}item" href="{{.RepoLink}}/activity">
 | |
| 		{{ctx.Locale.Tr "repo.activity.navbar.pulse"}}
 | |
| 	</a>
 | |
| 	{{if $canReadCode}}
 | |
| 		<a class="{{if .PageIsContributors}}active {{end}}item" href="{{.RepoLink}}/activity/contributors">
 | |
| 			{{ctx.Locale.Tr "repo.activity.navbar.contributors"}}
 | |
| 		</a>
 | |
| 		<a class="{{if .PageIsCodeFrequency}}active{{end}} item" href="{{.RepoLink}}/activity/code-frequency">
 | |
| 			{{ctx.Locale.Tr "repo.activity.navbar.code_frequency"}}
 | |
| 		</a>
 | |
| 		<a class="{{if .PageIsRecentCommits}}active{{end}} item" href="{{.RepoLink}}/activity/recent-commits">
 | |
| 			{{ctx.Locale.Tr "repo.activity.navbar.recent_commits"}}
 | |
| 		</a>
 | |
| 	{{end}}
 | |
| </div>
 |