{{template "base/alert" .}}
{{if .RepoOwnerIsOrganization}}
{{.locale.Tr "repo.settings.collaboration"}}
{{if .Collaborators}}
{{range .Collaborators}}
{{end}}
{{end}}
{{svg "octicon-shield-lock"}}
{{if eq .Collaboration.Mode 1}}{{$.locale.Tr "repo.settings.collaboration.read"}}{{else if eq .Collaboration.Mode 2}}{{$.locale.Tr "repo.settings.collaboration.write"}}{{else if eq .Collaboration.Mode 3}}{{$.locale.Tr "repo.settings.collaboration.admin"}}{{else}}{{$.locale.Tr "repo.settings.collaboration.undefined"}}{{end}}
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
{{$.locale.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 .AccessMode 1) (eq .AccessMode 2)}}
{{$first := true}}
{{if $allowedToChangeTeams}}
{{if eq .AccessMode 1}}{{$.locale.Tr "repo.settings.collaboration.read"}}{{else if eq .AccessMode 2}}{{$.locale.Tr "repo.settings.collaboration.write"}}{{else if eq .AccessMode 3}}{{$.locale.Tr "repo.settings.collaboration.admin"}}{{else if eq .AccessMode 4}}{{$.locale.Tr "repo.settings.collaboration.owner"}}{{else}}{{$.locale.Tr "repo.settings.collaboration.undefined"}}{{end}}
Sections: {{range $u, $unit := $.Units}}{{if and ($.Repo.UnitEnabled $.Context $unit.Type) ($team.UnitEnabled $.Context $unit.Type)}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{$.locale.Tr $unit.NameKey}}{{end}}{{end}} {{if $first}}None{{end}}
{{end}}
{{if $allowedToChangeTeams}}
{{else}}
{{end}}
{{$.locale.Tr "repo.settings.change_team_access_not_allowed"}}
{{end}}