mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Backport #34827 by wxiaoguang Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -63,13 +63,33 @@
|
||||
{{.Name}}
|
||||
</a>
|
||||
<div class="flex-item-body flex-text-block">
|
||||
{{/*FIXME: TEAM-UNIT-PERMISSION this display is not right, search the fixme keyword to see more details */}}
|
||||
{{svg "octicon-shield-lock"}}
|
||||
{{if eq .AccessMode 1}}{{ctx.Locale.Tr "repo.settings.collaboration.read"}}{{else if eq .AccessMode 2}}{{ctx.Locale.Tr "repo.settings.collaboration.write"}}{{else if eq .AccessMode 3}}{{ctx.Locale.Tr "repo.settings.collaboration.admin"}}{{else if eq .AccessMode 4}}{{ctx.Locale.Tr "repo.settings.collaboration.owner"}}{{else}}{{ctx.Locale.Tr "repo.settings.collaboration.undefined"}}{{end}}
|
||||
{{if eq .AccessMode 0}}
|
||||
{{ctx.Locale.Tr "repo.settings.collaboration.per_unit"}}
|
||||
{{else if eq .AccessMode 1}}
|
||||
{{ctx.Locale.Tr "repo.settings.collaboration.read"}}
|
||||
{{else if eq .AccessMode 2}}
|
||||
{{ctx.Locale.Tr "repo.settings.collaboration.write"}}
|
||||
{{else if eq .AccessMode 3}}
|
||||
{{ctx.Locale.Tr "repo.settings.collaboration.admin"}}
|
||||
{{else if eq .AccessMode 4}}
|
||||
{{ctx.Locale.Tr "repo.settings.collaboration.owner"}}
|
||||
{{else}}
|
||||
{{ctx.Locale.Tr "repo.settings.collaboration.undefined"}}
|
||||
{{end}}
|
||||
</div>
|
||||
{{if or (eq .AccessMode 1) (eq .AccessMode 2)}}
|
||||
{{if or (eq .AccessMode 0) (eq .AccessMode 1) (eq .AccessMode 2)}}
|
||||
{{$first := true}}
|
||||
<div class="flex-item-body" data-tooltip-content="{{ctx.Locale.Tr "repo.settings.change_team_permission_tip"}}">
|
||||
Sections: {{range $u, $unit := $.Units}}{{if and ($.Repo.UnitEnabled ctx $unit.Type) ($team.UnitEnabled ctx $unit.Type)}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{ctx.Locale.Tr $unit.NameKey}}{{end}}{{end}} {{if $first}}None{{end}}
|
||||
Units:
|
||||
{{range $u, $unit := $.Units}}
|
||||
{{- if and ($.Repo.UnitEnabled ctx $unit.Type) ($team.UnitEnabled ctx $unit.Type) -}}
|
||||
{{- Iif $first "" ", "}}{{ctx.Locale.Tr $unit.NameKey -}}
|
||||
{{- $first = false -}}
|
||||
{{- end -}}
|
||||
{{end}}
|
||||
{{if $first}}None{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user