{{template "base/head" .}}
{{template "repo/header" .}} {{template "repo/settings/navbar" .}}
{{template "base/alert" .}}

{{.i18n.Tr "repo.settings.collaboration"}}

{{if .Collaborators}}
{{range .Collaborators}}
{{end}}
{{end}}
{{.CsrfTokenHtml}}

Teams

{{ $allowedToChangeTeams := ( or (.Org.RepoAdminChangeTeamAccess) (.Permission.IsOwner)) }} {{if .Teams}}
{{range $t, $team := .Teams}}
{{ if or (eq .Authorize 1) (eq .Authorize 2) }} {{ $first := true }}
Sections: {{range $u, $unit := $.Units}}{{if and ($.Repo.UnitEnabled $unit.Type) ($team.UnitEnabled $unit.Type)}}{{if $first}}{{ $first = false }}{{else}}, {{end}}{{$.i18n.Tr $unit.NameKey}}{{end}}{{end}} {{if $first}}None{{end}}
{{end}}
{{if $allowedToChangeTeams}} {{ $globalRepoAccess := (eq .LowerName "owners") }}
{{end}}
{{end}}
{{end}}
{{if $allowedToChangeTeams}}
{{.CsrfTokenHtml}}
{{else}}
Changing team access for repository has been restricted to organization owner
{{end}}
{{template "base/footer" .}}