{{template "base/alert" .}}
{{if .RepoOwnerIsOrganization}}
{{.i18n.Tr "repo.settings.collaboration"}}
{{if .Collaborators}}
{{range .Collaborators}}
{{end}}
{{end}}
{{svg "octicon-shield-lock"}}
{{if eq .Collaboration.Mode 1}}{{$.i18n.Tr "repo.settings.collaboration.read"}}{{else if eq .Collaboration.Mode 2}}{{$.i18n.Tr "repo.settings.collaboration.write"}}{{else if eq .Collaboration.Mode 3}}{{$.i18n.Tr "repo.settings.collaboration.admin"}}{{else}}{{$.i18n.Tr "repo.settings.collaboration.undefined"}}{{end}}
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
{{$.i18n.Tr "repo.settings.teams"}}
{{ $allowedToChangeTeams := ( or (.Org.RepoAdminChangeTeamAccess) (.Permission.IsOwner)) }} {{if .Teams}}
{{range $t, $team := .Teams}}
{{end}}
{{end}}
{{end}}
{{svg "octicon-shield-lock"}}
{{ if or (eq .Authorize 1) (eq .Authorize 2) }}
{{ $first := true }}
{{if $allowedToChangeTeams}}
{{if eq .Authorize 1}}{{$.i18n.Tr "repo.settings.collaboration.read"}}{{else if eq .Authorize 2}}{{$.i18n.Tr "repo.settings.collaboration.write"}}{{else if eq .Authorize 3}}{{$.i18n.Tr "repo.settings.collaboration.admin"}}{{else if eq .Authorize 4}}{{$.i18n.Tr "repo.settings.collaboration.owner"}}{{else}}{{$.i18n.Tr "repo.settings.collaboration.undefined"}}{{end}}
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}}
{{else}}
{{end}}
{{$.i18n.Tr "repo.settings.change_team_access_not_allowed"}}
{{end}}