mirror of
https://github.com/go-gitea/gitea
synced 2025-08-10 03:28:20 +00:00
Backport #34053 When a team have no code unit permission of a repository, the member of the team should not view activity contributors, recent commits and code frequrency. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
19 lines
788 B
Handlebars
19 lines
788 B
Handlebars
{{$canReadCode := $.Permission.CanRead ctx.Consts.RepoUnitTypeCode}}
|
|
|
|
<div class="ui fluid vertical menu">
|
|
<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>
|