From dd136858f1ea40ad3c94191d647487fa4f31926c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 18 Oct 2024 20:33:49 +0200 Subject: Adding upstream version 9.0.0. Signed-off-by: Daniel Baumann --- templates/repo/settings/collaboration.tmpl | 117 +++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 templates/repo/settings/collaboration.tmpl (limited to 'templates/repo/settings/collaboration.tmpl') diff --git a/templates/repo/settings/collaboration.tmpl b/templates/repo/settings/collaboration.tmpl new file mode 100644 index 0000000..8028642 --- /dev/null +++ b/templates/repo/settings/collaboration.tmpl @@ -0,0 +1,117 @@ +{{template "repo/settings/layout_head" (dict "ctxData" . "pageClass" "repository settings collaboration")}} +
+

+ {{ctx.Locale.Tr "repo.settings.collaboration"}} +

+ {{if .Collaborators}} +
+
+ {{range .Collaborators}} +
+ +
+
+ {{template "shared/user/name" .}} +
+
+
+
+ {{svg "octicon-shield-lock"}} + +
+ +
+
+ {{end}} +
+
+ {{end}} +
+
+ {{.CsrfTokenHtml}} + + +
+
+ + {{if .RepoOwnerIsOrganization}} +

+ {{ctx.Locale.Tr "repo.settings.teams"}} +

+ {{$allowedToChangeTeams := (or (.Org.RepoAdminChangeTeamAccess) (.Permission.IsOwner))}} + {{if .Teams}} +
+
+ {{range $t, $team := .Teams}} +
+
+ + {{.Name}} + +
+ {{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 or (eq .AccessMode 1) (eq .AccessMode 2)}} + {{$first := true}} +
+ Sections: {{range $u, $unit := $.Units}}{{if and ($.Repo.UnitEnabled $.Context $unit.Type) ($team.UnitEnabled $.Context $unit.Type)}}{{if $first}}{{$first = false}}{{else}}, {{end}}{{ctx.Locale.Tr $unit.NameKey}}{{end}}{{end}} {{if $first}}None{{end}} +
+ {{end}} +
+ {{if $allowedToChangeTeams}} +
+ +
+ {{end}} +
+ {{end}} +
+
+ {{end}} +
+ {{if $allowedToChangeTeams}} +
+ {{.CsrfTokenHtml}} + + +
+ {{else}} +
+ {{ctx.Locale.Tr "repo.settings.change_team_access_not_allowed"}} +
+ {{end}} +
+ {{end}} +
+ + + +{{template "repo/settings/layout_footer" .}} -- cgit v1.2.3