mirror of https://github.com/go-gitea/gitea.git
Hide activity contributors, recent commits and code frequrency left tabs if there is no code permission (#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>pull/34051/head
parent
bf9500b3f2
commit
49899070cd
@ -1,14 +1,18 @@
|
|||||||
|
{{$canReadCode := $.Permission.CanRead ctx.Consts.RepoUnitTypeCode}}
|
||||||
|
|
||||||
<div class="ui fluid vertical menu">
|
<div class="ui fluid vertical menu">
|
||||||
<a class="{{if .PageIsPulse}}active {{end}}item" href="{{.RepoLink}}/activity">
|
<a class="{{if .PageIsPulse}}active {{end}}item" href="{{.RepoLink}}/activity">
|
||||||
{{ctx.Locale.Tr "repo.activity.navbar.pulse"}}
|
{{ctx.Locale.Tr "repo.activity.navbar.pulse"}}
|
||||||
</a>
|
</a>
|
||||||
<a class="{{if .PageIsContributors}}active {{end}}item" href="{{.RepoLink}}/activity/contributors">
|
{{if $canReadCode}}
|
||||||
{{ctx.Locale.Tr "repo.activity.navbar.contributors"}}
|
<a class="{{if .PageIsContributors}}active {{end}}item" href="{{.RepoLink}}/activity/contributors">
|
||||||
</a>
|
{{ctx.Locale.Tr "repo.activity.navbar.contributors"}}
|
||||||
<a class="{{if .PageIsCodeFrequency}}active{{end}} item" href="{{.RepoLink}}/activity/code-frequency">
|
</a>
|
||||||
{{ctx.Locale.Tr "repo.activity.navbar.code_frequency"}}
|
<a class="{{if .PageIsCodeFrequency}}active{{end}} item" href="{{.RepoLink}}/activity/code-frequency">
|
||||||
</a>
|
{{ctx.Locale.Tr "repo.activity.navbar.code_frequency"}}
|
||||||
<a class="{{if .PageIsRecentCommits}}active{{end}} item" href="{{.RepoLink}}/activity/recent-commits">
|
</a>
|
||||||
{{ctx.Locale.Tr "repo.activity.navbar.recent_commits"}}
|
<a class="{{if .PageIsRecentCommits}}active{{end}} item" href="{{.RepoLink}}/activity/recent-commits">
|
||||||
</a>
|
{{ctx.Locale.Tr "repo.activity.navbar.recent_commits"}}
|
||||||
|
</a>
|
||||||
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
Reference in New Issue