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/org/team/invite.tmpl | 23 ++++++ templates/org/team/members.tmpl | 88 +++++++++++++++++++++ templates/org/team/navbar.tmpl | 4 + templates/org/team/new.tmpl | 148 +++++++++++++++++++++++++++++++++++ templates/org/team/repositories.tmpl | 61 +++++++++++++++ templates/org/team/sidebar.tmpl | 94 ++++++++++++++++++++++ templates/org/team/teams.tmpl | 56 +++++++++++++ 7 files changed, 474 insertions(+) create mode 100644 templates/org/team/invite.tmpl create mode 100644 templates/org/team/members.tmpl create mode 100644 templates/org/team/navbar.tmpl create mode 100644 templates/org/team/new.tmpl create mode 100644 templates/org/team/repositories.tmpl create mode 100644 templates/org/team/sidebar.tmpl create mode 100644 templates/org/team/teams.tmpl (limited to 'templates/org/team') diff --git a/templates/org/team/invite.tmpl b/templates/org/team/invite.tmpl new file mode 100644 index 0000000..1167828 --- /dev/null +++ b/templates/org/team/invite.tmpl @@ -0,0 +1,23 @@ +{{template "base/head" .}} +
+
+ {{template "base/alert" .}} +
+
+ {{ctx.AvatarUtils.Avatar .Organization 140}} +
+
+
{{ctx.Locale.Tr "org.teams.invite.title" .Team.Name .Organization.Name}}
+
{{ctx.Locale.Tr "org.teams.invite.by" .Inviter.Name}}
+
{{ctx.Locale.Tr "org.teams.invite.description"}}
+
+
+
+ {{.CsrfTokenHtml}} + +
+
+
+
+
+{{template "base/footer" .}} diff --git a/templates/org/team/members.tmpl b/templates/org/team/members.tmpl new file mode 100644 index 0000000..7e9a59a --- /dev/null +++ b/templates/org/team/members.tmpl @@ -0,0 +1,88 @@ +{{template "base/head" .}} +
+ {{template "org/header" .}} +
+ {{template "base/alert" .}} +
+ {{template "org/team/sidebar" .}} +
+ {{template "org/team/navbar" .}} + {{if .IsOrganizationOwner}} +
+
+ {{.CsrfTokenHtml}} + + + +
+
+ {{end}} +
+
+ {{range .Team.Members}} +
+ +
+
+ {{template "shared/user/name" .}} +
+
+
+ {{if and $.IsOrganizationOwner (not (and ($.Team.IsOwnerTeam) (eq (len $.Team.Members) 1)))}} +
+ +
+ {{end}} +
+
+ {{else}} +
+ {{ctx.Locale.Tr "org.teams.members.none"}} +
+ {{end}} +
+
+ {{if and .Invites $.IsOrganizationOwner}} +

{{ctx.Locale.Tr "org.teams.invite_team_member.list"}}

+
+
+ {{range .Invites}} +
+
+ {{.Email}} +
+
+
+ {{$.CsrfTokenHtml}} + + +
+
+
+ {{end}} +
+
+ {{end}} +
+
+
+
+ +{{template "base/footer" .}} diff --git a/templates/org/team/navbar.tmpl b/templates/org/team/navbar.tmpl new file mode 100644 index 0000000..8f2571e --- /dev/null +++ b/templates/org/team/navbar.tmpl @@ -0,0 +1,4 @@ + diff --git a/templates/org/team/new.tmpl b/templates/org/team/new.tmpl new file mode 100644 index 0000000..ed9cb98 --- /dev/null +++ b/templates/org/team/new.tmpl @@ -0,0 +1,148 @@ +{{template "base/head" .}} +
+ {{template "org/header" .}} +
+
+
+
+ {{.CsrfTokenHtml}} +

+ {{if .PageIsOrgTeamsNew}}{{ctx.Locale.Tr "org.create_new_team"}}{{else}}{{ctx.Locale.Tr "org.teams.settings"}}{{end}} +

+
+ {{template "base/alert" .}} +
+ + {{if eq .Team.LowerName "owners"}} + + {{end}} + + {{ctx.Locale.Tr "org.team_name_helper"}} +
+
+ + + {{ctx.Locale.Tr "org.team_desc_helper"}} +
+ {{if not (eq .Team.LowerName "owners")}} +
+ {{ctx.Locale.Tr "org.team_access_desc"}} + + + + +
+
+ {{ctx.Locale.Tr "org.team_permission_desc"}} + + +
+ {{ctx.Locale.Tr "org.team_unit_desc"}} + {{ctx.Locale.Tr "org.teams.none_access_helper"}} + + + + + + + + + + + + {{range $t, $unit := $.Units}} + {{if ge $unit.MaxPerm 2}} + + + + + + + {{end}} + {{end}} + +
{{ctx.Locale.Tr "units.unit"}}{{ctx.Locale.Tr "org.teams.none_access"}}{{ctx.Locale.Tr "org.teams.read_access"}}{{ctx.Locale.Tr "org.teams.write_access"}}
+ + + + + + + +
+
+ {{range $t, $unit := $.Units}} + {{if lt $unit.MaxPerm 2}} + + {{end}} + {{end}} +
+
+
+ {{end}} + +
+ {{if .PageIsOrgTeamsNew}} + + {{else}} + + {{if not (eq .Team.LowerName "owners")}} + + {{end}} + {{end}} +
+
+
+
+
+
+
+ + +{{template "base/footer" .}} diff --git a/templates/org/team/repositories.tmpl b/templates/org/team/repositories.tmpl new file mode 100644 index 0000000..f5d68ce --- /dev/null +++ b/templates/org/team/repositories.tmpl @@ -0,0 +1,61 @@ +{{template "base/head" .}} +
+ {{template "org/header" .}} +
+ {{template "base/alert" .}} +
+ {{template "org/team/sidebar" .}} +
+ {{template "org/team/navbar" .}} + {{$canAddRemove := and $.IsOrganizationOwner (not $.Team.IncludesAllRepositories)}} + {{if $canAddRemove}} +
+
+ {{.CsrfTokenHtml}} + + +
+
+ + +
+
+ {{end}} +
+
+ {{range .Team.Repos}} +
+
+ {{template "repo/icon" .}} +
+ +
+ {{if $canAddRemove}} +
+ {{$.CsrfTokenHtml}} + +
+ {{end}} +
+
+ {{else}} +
+ {{ctx.Locale.Tr "org.teams.repos.none"}} +
+ {{end}} +
+
+
+
+
+
+ +{{template "base/footer" .}} diff --git a/templates/org/team/sidebar.tmpl b/templates/org/team/sidebar.tmpl new file mode 100644 index 0000000..c9f8025 --- /dev/null +++ b/templates/org/team/sidebar.tmpl @@ -0,0 +1,94 @@ +
+

+ {{.Team.Name}} +
+ {{if .Team.IsMember ctx $.SignedUser.ID}} +
+ +
+ {{else if .IsOrganizationOwner}} +
+ {{$.CsrfTokenHtml}} + + +
+ {{end}} +
+

+
+
+ {{if .Team.Description}} + {{.Team.Description}} + {{else}} + {{ctx.Locale.Tr "org.teams.no_desc"}} + {{end}} +
+ {{if eq .Team.LowerName "owners"}} +
+ {{ctx.Locale.Tr "org.teams.owners_permission_desc"}} +
+ {{else}} +
+

{{ctx.Locale.Tr "org.team_access_desc"}}

+
    + {{if .Team.IncludesAllRepositories}} +
  • {{ctx.Locale.Tr "org.teams.all_repositories"}}
  • + {{else}} +
  • {{ctx.Locale.Tr "org.teams.specific_repositories"}}
  • + {{end}} + {{if .Team.CanCreateOrgRepo}} +
  • {{ctx.Locale.Tr "org.teams.can_create_org_repo"}}
  • + {{end}} +
+ {{if (eq .Team.AccessMode 2)}} +

{{ctx.Locale.Tr "org.settings.permission"}}

+ {{ctx.Locale.Tr "org.teams.write_permission_desc"}} + {{else if (eq .Team.AccessMode 3)}} +

{{ctx.Locale.Tr "org.settings.permission"}}

+ {{ctx.Locale.Tr "org.teams.admin_permission_desc"}} + {{else}} + + + + + + + + + {{range $t, $unit := $.Units}} + {{if (not $unit.Type.UnitGlobalDisabled)}} + + + + + {{end}} + {{end}} + +
{{ctx.Locale.Tr "units.unit"}}{{ctx.Locale.Tr "org.team_permission_desc"}}
{{ctx.Locale.Tr $unit.NameKey}}{{if eq ($.Team.UnitAccessMode $.Context $unit.Type) 0 -}} + {{ctx.Locale.Tr "org.teams.none_access"}} + {{- else if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 1) -}} + {{ctx.Locale.Tr "org.teams.read_access"}} + {{- else if eq ($.Team.UnitAccessMode $.Context $unit.Type) 2 -}} + {{ctx.Locale.Tr "org.teams.write_access"}} + {{- end}}
+ {{end}} +
+ {{end}} +
+ {{if .IsOrganizationOwner}} + + {{end}} +
+ diff --git a/templates/org/team/teams.tmpl b/templates/org/team/teams.tmpl new file mode 100644 index 0000000..53c909e --- /dev/null +++ b/templates/org/team/teams.tmpl @@ -0,0 +1,56 @@ +{{template "base/head" .}} +
+ {{template "org/header" .}} +
+ {{template "base/alert" .}} + {{if .IsOrganizationOwner}} + +
+ {{end}} + +
+ {{range .Teams}} +
+
+ {{.Name}} +
+ {{ctx.Locale.Tr "view"}} + {{if .IsMember ctx $.SignedUser.ID}} +
+ +
+ {{else if $.IsOrganizationOwner}} +
+ {{$.CsrfTokenHtml}} + +
+ {{end}} +
+
+
+ {{range .Members}} + {{template "shared/user/avatarlink" dict "user" .}} + {{end}} +
+ +
+ {{end}} +
+
+
+ +{{template "base/footer" .}} -- cgit v1.2.3