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/create.tmpl | 57 ++++++++ templates/org/follow_unfollow.tmpl | 7 + templates/org/header.tmpl | 37 ++++++ templates/org/home.tmpl | 73 ++++++++++ templates/org/member/members.tmpl | 90 +++++++++++++ templates/org/menu.tmpl | 57 ++++++++ templates/org/projects/list.tmpl | 24 ++++ templates/org/projects/new.tmpl | 9 ++ templates/org/projects/view.tmpl | 11 ++ templates/org/settings/actions.tmpl | 11 ++ templates/org/settings/applications.tmpl | 9 ++ .../org/settings/applications_oauth2_edit.tmpl | 5 + templates/org/settings/blocked_users.tmpl | 21 +++ templates/org/settings/delete.tmpl | 35 +++++ templates/org/settings/hook_new.tmpl | 7 + templates/org/settings/hooks.tmpl | 5 + templates/org/settings/labels.tmpl | 15 +++ templates/org/settings/layout_footer.tmpl | 11 ++ templates/org/settings/layout_head.tmpl | 14 ++ templates/org/settings/navbar.tmpl | 48 +++++++ templates/org/settings/options.tmpl | 102 ++++++++++++++ templates/org/settings/packages.tmpl | 6 + .../org/settings/packages_cleanup_rules_edit.tmpl | 5 + .../settings/packages_cleanup_rules_preview.tmpl | 5 + templates/org/settings/runners_edit.tmpl | 5 + 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 ++++++++ 32 files changed, 1143 insertions(+) create mode 100644 templates/org/create.tmpl create mode 100644 templates/org/follow_unfollow.tmpl create mode 100644 templates/org/header.tmpl create mode 100644 templates/org/home.tmpl create mode 100644 templates/org/member/members.tmpl create mode 100644 templates/org/menu.tmpl create mode 100644 templates/org/projects/list.tmpl create mode 100644 templates/org/projects/new.tmpl create mode 100644 templates/org/projects/view.tmpl create mode 100644 templates/org/settings/actions.tmpl create mode 100644 templates/org/settings/applications.tmpl create mode 100644 templates/org/settings/applications_oauth2_edit.tmpl create mode 100644 templates/org/settings/blocked_users.tmpl create mode 100644 templates/org/settings/delete.tmpl create mode 100644 templates/org/settings/hook_new.tmpl create mode 100644 templates/org/settings/hooks.tmpl create mode 100644 templates/org/settings/labels.tmpl create mode 100644 templates/org/settings/layout_footer.tmpl create mode 100644 templates/org/settings/layout_head.tmpl create mode 100644 templates/org/settings/navbar.tmpl create mode 100644 templates/org/settings/options.tmpl create mode 100644 templates/org/settings/packages.tmpl create mode 100644 templates/org/settings/packages_cleanup_rules_edit.tmpl create mode 100644 templates/org/settings/packages_cleanup_rules_preview.tmpl create mode 100644 templates/org/settings/runners_edit.tmpl 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') diff --git a/templates/org/create.tmpl b/templates/org/create.tmpl new file mode 100644 index 0000000..ad172ea --- /dev/null +++ b/templates/org/create.tmpl @@ -0,0 +1,57 @@ +{{template "base/head" .}} +
+
+
+
+ {{.CsrfTokenHtml}} +

+ {{ctx.Locale.Tr "new_org.title"}} +

+
+ {{template "base/alert" .}} +
+ + + {{ctx.Locale.Tr "org.org_name_helper"}} +
+ +
+ +
+
+ + +
+
+ + +
+
+ + +
+
+
+ +
+ +
+
+ + +
+
+
+ +
+ + +
+
+
+
+
+
+{{template "base/footer" .}} diff --git a/templates/org/follow_unfollow.tmpl b/templates/org/follow_unfollow.tmpl new file mode 100644 index 0000000..ba0bd01 --- /dev/null +++ b/templates/org/follow_unfollow.tmpl @@ -0,0 +1,7 @@ + diff --git a/templates/org/header.tmpl b/templates/org/header.tmpl new file mode 100644 index 0000000..494dedf --- /dev/null +++ b/templates/org/header.tmpl @@ -0,0 +1,37 @@ +
+ {{ctx.AvatarUtils.Avatar .Org 100 "org-avatar"}} +
+
+
+ {{.Org.DisplayName}} + + {{if .Org.Visibility.IsLimited}}{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}{{end}} + {{if .Org.Visibility.IsPrivate}}{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}{{end}} + +
+ + {{if .EnableFeed}} + + {{svg "octicon-rss" 24}} + + {{end}} + {{if .IsSigned}} + {{template "org/follow_unfollow" .}} + {{end}} + {{if .IsOrganizationMember}} + {{ctx.Locale.Tr "org.open_dashboard"}} + {{end}} + +
+ {{if .RenderedDescription}}
{{.RenderedDescription}}
{{end}} +
+ {{if .Org.Location}}
{{svg "octicon-location"}} {{.Org.Location}}
{{end}} + {{if .Org.Website}}
{{svg "octicon-link"}} {{.Org.Website}}
{{end}} + {{if .IsSigned}} + {{if .Org.Email}}
{{svg "octicon-mail"}} {{.Org.Email}}
{{end}} + {{end}} +
+
+
+ +{{template "org/menu" .}} diff --git a/templates/org/home.tmpl b/templates/org/home.tmpl new file mode 100644 index 0000000..3ae5f01 --- /dev/null +++ b/templates/org/home.tmpl @@ -0,0 +1,73 @@ +{{template "base/head" .}} +
+ {{if .Flash}} +
+ {{template "base/alert" .}} +
+ {{end}} + {{template "org/header" .}} + +
+
+
+ {{if .ProfileReadme}} +
{{.ProfileReadme}}
+ {{end}} + {{template "shared/repo_search" .}} + {{template "explore/repo_list" .}} + {{template "base/paginate" .}} +
+ + {{if .ShowMemberAndTeamTab}} +
+ {{if .CanCreateOrgRepo}} +
+ {{ctx.Locale.Tr "new_repo.link"}} + {{if not .DisableNewPullMirrors}} + {{ctx.Locale.Tr "new_migrate.link"}} + {{end}} +
+
+ {{end}} + {{if .NumMembers}} +

+ {{ctx.Locale.Tr "org.members"}} + {{.NumMembers}} {{svg "octicon-chevron-right"}} +

+
+ {{$isMember := .IsOrganizationMember}} + {{range .Members}} + {{if or $isMember (call $.IsPublicMember .ID)}} + {{ctx.AvatarUtils.Avatar . 48}} + {{end}} + {{end}} +
+ {{end}} + {{if .IsOrganizationMember}} +
+ {{ctx.Locale.Tr "org.teams"}} + {{.Org.NumTeams}} {{svg "octicon-chevron-right"}} +
+ + {{if .IsOrganizationOwner}} + + {{end}} + {{end}} +
+ {{end}} +
+
+
+{{template "base/footer" .}} diff --git a/templates/org/member/members.tmpl b/templates/org/member/members.tmpl new file mode 100644 index 0000000..4388dc9 --- /dev/null +++ b/templates/org/member/members.tmpl @@ -0,0 +1,90 @@ +{{template "base/head" .}} +
+ {{template "org/header" .}} +
+ {{template "base/alert" .}} + +
+ {{range .Members}} + {{$isPublic := index $.MembersIsPublicMember .ID}} +
+ +
+
+ {{template "shared/user/name" .}} + {{if not $isPublic}} + {{ctx.Locale.Tr "org.members.private"}} + {{end}} +
+ {{if not $.PublicOnly}} +
+ {{ctx.Locale.Tr "org.members.member_role"}} + {{if index $.MembersIsUserOrgOwner .ID}}{{svg "octicon-shield-lock"}} {{ctx.Locale.Tr "org.members.owner"}}{{else}}{{ctx.Locale.Tr "org.members.member"}}{{end}} +
+ {{if $.IsOrganizationOwner}} +
+ {{ctx.Locale.Tr "admin.users.2fa"}} + + {{if index $.MembersTwoFaStatus .ID}} + {{svg "octicon-check"}} + {{else}} + {{svg "octicon-x"}} + {{end}} + +
+ {{end}} + {{end}} +
+
+ {{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}} + {{if $isPublic}} + {{svg "octicon-eye-closed" 12 "icon"}}{{ctx.Locale.Tr "org.members.public_helper"}} + {{else}} + {{svg "octicon-eye" 12 "icon"}}{{ctx.Locale.Tr "org.members.private_helper"}} + {{end}} + {{end}} + {{if eq $.SignedUser.ID .ID}} +
+ +
+ {{else if $.IsOrganizationOwner}} +
+ +
+ {{end}} +
+
+ {{end}} +
+ + {{template "base/paginate" .}} +
+
+ + + +{{template "base/footer" .}} diff --git a/templates/org/menu.tmpl b/templates/org/menu.tmpl new file mode 100644 index 0000000..9ac3a61 --- /dev/null +++ b/templates/org/menu.tmpl @@ -0,0 +1,57 @@ + diff --git a/templates/org/projects/list.tmpl b/templates/org/projects/list.tmpl new file mode 100644 index 0000000..80dde1c --- /dev/null +++ b/templates/org/projects/list.tmpl @@ -0,0 +1,24 @@ +{{template "base/head" .}} +{{if .ContextUser.IsOrganization}} +
+ {{template "org/header" .}} +
+ {{template "projects/list" .}} +
+
+{{else}} +
+
+
+
+ {{template "shared/user/profile_big_avatar" .}} +
+
+ {{template "user/overview/header" .}} + {{template "projects/list" .}} +
+
+
+
+{{end}} +{{template "base/footer" .}} diff --git a/templates/org/projects/new.tmpl b/templates/org/projects/new.tmpl new file mode 100644 index 0000000..fc52130 --- /dev/null +++ b/templates/org/projects/new.tmpl @@ -0,0 +1,9 @@ +{{template "base/head" .}} +
+ {{template "shared/user/org_profile_avatar" .}} +
+ {{template "user/overview/header" .}} + {{template "projects/new" .}} +
+
+{{template "base/footer" .}} diff --git a/templates/org/projects/view.tmpl b/templates/org/projects/view.tmpl new file mode 100644 index 0000000..e1ab81c --- /dev/null +++ b/templates/org/projects/view.tmpl @@ -0,0 +1,11 @@ +{{template "base/head" .}} +
+ {{template "shared/user/org_profile_avatar" .}} +
+ {{template "user/overview/header" .}} +
+
+ {{template "projects/view" .}} +
+
+{{template "base/footer" .}} diff --git a/templates/org/settings/actions.tmpl b/templates/org/settings/actions.tmpl new file mode 100644 index 0000000..abb9c98 --- /dev/null +++ b/templates/org/settings/actions.tmpl @@ -0,0 +1,11 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings actions")}} +
+ {{if eq .PageType "runners"}} + {{template "shared/actions/runner_list" .}} + {{else if eq .PageType "secrets"}} + {{template "shared/secrets/add_list" .}} + {{else if eq .PageType "variables"}} + {{template "shared/variables/variable_list" .}} + {{end}} +
+{{template "org/settings/layout_footer" .}} diff --git a/templates/org/settings/applications.tmpl b/templates/org/settings/applications.tmpl new file mode 100644 index 0000000..df5f4e9 --- /dev/null +++ b/templates/org/settings/applications.tmpl @@ -0,0 +1,9 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings options")}} +
+

+ {{ctx.Locale.Tr "settings.applications"}} +

+ + {{template "user/settings/applications_oauth2_list" .}} +
+{{template "org/settings/layout_footer" .}} diff --git a/templates/org/settings/applications_oauth2_edit.tmpl b/templates/org/settings/applications_oauth2_edit.tmpl new file mode 100644 index 0000000..987803a --- /dev/null +++ b/templates/org/settings/applications_oauth2_edit.tmpl @@ -0,0 +1,5 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings options")}} +
+ {{template "user/settings/applications_oauth2_edit_form" .}} +
+{{template "org/settings/layout_footer" .}} diff --git a/templates/org/settings/blocked_users.tmpl b/templates/org/settings/blocked_users.tmpl new file mode 100644 index 0000000..f685a1b --- /dev/null +++ b/templates/org/settings/blocked_users.tmpl @@ -0,0 +1,21 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings blocked-users")}} +
+
+
+ {{.CsrfTokenHtml}} + +
+ +
+ +
+
+
+ {{template "shared/blocked_users_list" .}} +
+
+{{template "org/settings/layout_footer" .}} diff --git a/templates/org/settings/delete.tmpl b/templates/org/settings/delete.tmpl new file mode 100644 index 0000000..e1ef471 --- /dev/null +++ b/templates/org/settings/delete.tmpl @@ -0,0 +1,35 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings delete")}} + +
+

+ {{ctx.Locale.Tr "org.settings.delete_account"}} +

+
+
+

{{svg "octicon-alert"}} {{ctx.Locale.Tr "org.settings.delete_prompt"}}

+
+
+ {{.CsrfTokenHtml}} +
+ + +
+ +
+
+
+ + + +{{template "org/settings/layout_footer" .}} diff --git a/templates/org/settings/hook_new.tmpl b/templates/org/settings/hook_new.tmpl new file mode 100644 index 0000000..f89ee5f --- /dev/null +++ b/templates/org/settings/hook_new.tmpl @@ -0,0 +1,7 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings new webhook")}} +
+ {{$CustomHeaderTitle := ctx.Locale.Tr "repo.settings.update_webhook"}} + {{if .PageIsSettingsHooksNew}}{{$CustomHeaderTitle = ctx.Locale.Tr "repo.settings.add_webhook"}}{{end}} + {{template "webhook/new" (dict "ctxData" . "CustomHeaderTitle" $CustomHeaderTitle)}} +
+{{template "org/settings/layout_footer" .}} diff --git a/templates/org/settings/hooks.tmpl b/templates/org/settings/hooks.tmpl new file mode 100644 index 0000000..9f30796 --- /dev/null +++ b/templates/org/settings/hooks.tmpl @@ -0,0 +1,5 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings webhooks")}} +
+ {{template "repo/settings/webhook/list" .}} +
+{{template "org/settings/layout_footer" .}} diff --git a/templates/org/settings/labels.tmpl b/templates/org/settings/labels.tmpl new file mode 100644 index 0000000..25a562c --- /dev/null +++ b/templates/org/settings/labels.tmpl @@ -0,0 +1,15 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings labels")}} +
+
+
+ {{ctx.Locale.Tr "org.settings.labels_desc"}} +
+ +
+
+ {{template "repo/issue/labels/label_new" .}} + {{template "repo/issue/labels/label_list" .}} +
+{{template "repo/issue/labels/edit_delete_label" .}} +{{template "org/settings/layout_footer" .}} + diff --git a/templates/org/settings/layout_footer.tmpl b/templates/org/settings/layout_footer.tmpl new file mode 100644 index 0000000..09d88c0 --- /dev/null +++ b/templates/org/settings/layout_footer.tmpl @@ -0,0 +1,11 @@ +{{if false}}{{/* to make html structure "likely" complete to prevent IDE warnings */}} +
+
+
+ {{/* block: org-setting-content */}} +{{end}} + +
+
+
+{{template "base/footer" .}} diff --git a/templates/org/settings/layout_head.tmpl b/templates/org/settings/layout_head.tmpl new file mode 100644 index 0000000..31dad2c --- /dev/null +++ b/templates/org/settings/layout_head.tmpl @@ -0,0 +1,14 @@ +{{template "base/head" .ctxData}} +
+ {{template "org/header" .ctxData}} +
+ {{template "org/settings/navbar" .ctxData}} +
+ {{template "base/alert" .ctxData}} + {{/* block: org-setting-content */}} + +{{if false}}{{/* to make html structure "likely" complete to prevent IDE warnings */}} +
+
+
+{{end}} diff --git a/templates/org/settings/navbar.tmpl b/templates/org/settings/navbar.tmpl new file mode 100644 index 0000000..b245768 --- /dev/null +++ b/templates/org/settings/navbar.tmpl @@ -0,0 +1,48 @@ + diff --git a/templates/org/settings/options.tmpl b/templates/org/settings/options.tmpl new file mode 100644 index 0000000..62debfc --- /dev/null +++ b/templates/org/settings/options.tmpl @@ -0,0 +1,102 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings options")}} +
+

+ {{ctx.Locale.Tr "org.settings.options"}} +

+
+
+ {{.CsrfTokenHtml}} +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+
+ +
+
+ + +
+
+
+
+ + +
+
+
+
+ + +
+
+
+ +
+ +
+
+ + +
+
+
+ + {{if .SignedUser.IsAdmin}} +
+ +
+ + +

{{ctx.Locale.Tr "admin.users.max_repo_creation_desc"}}

+
+ {{end}} + +
+ +
+
+ +
+ +
+ {{.CsrfTokenHtml}} +
+ + +
+ +
+ + +
+
+
+
+{{template "org/settings/layout_footer" .}} diff --git a/templates/org/settings/packages.tmpl b/templates/org/settings/packages.tmpl new file mode 100644 index 0000000..91106c3 --- /dev/null +++ b/templates/org/settings/packages.tmpl @@ -0,0 +1,6 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings packages")}} +
+ {{template "package/shared/cleanup_rules/list" .}} + {{template "package/shared/cargo" .}} +
+{{template "org/settings/layout_footer" .}} diff --git a/templates/org/settings/packages_cleanup_rules_edit.tmpl b/templates/org/settings/packages_cleanup_rules_edit.tmpl new file mode 100644 index 0000000..ff4c2dd --- /dev/null +++ b/templates/org/settings/packages_cleanup_rules_edit.tmpl @@ -0,0 +1,5 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings packages")}} +
+ {{template "package/shared/cleanup_rules/edit" .}} +
+{{template "org/settings/layout_footer" .}} diff --git a/templates/org/settings/packages_cleanup_rules_preview.tmpl b/templates/org/settings/packages_cleanup_rules_preview.tmpl new file mode 100644 index 0000000..5a2f061 --- /dev/null +++ b/templates/org/settings/packages_cleanup_rules_preview.tmpl @@ -0,0 +1,5 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings packages")}} +
+ {{template "package/shared/cleanup_rules/preview" .}} +
+{{template "org/settings/layout_footer" .}} diff --git a/templates/org/settings/runners_edit.tmpl b/templates/org/settings/runners_edit.tmpl new file mode 100644 index 0000000..acd67a4 --- /dev/null +++ b/templates/org/settings/runners_edit.tmpl @@ -0,0 +1,5 @@ +{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings runners")}} +
+ {{template "shared/actions/runner_edit" .}} +
+{{template "org/settings/layout_footer" .}} 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