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/admin/user/edit.tmpl | 242 +++++++++++++++++++++++++++++++++ templates/admin/user/list.tmpl | 119 ++++++++++++++++ templates/admin/user/new.tmpl | 90 ++++++++++++ templates/admin/user/view.tmpl | 48 +++++++ templates/admin/user/view_details.tmpl | 74 ++++++++++ templates/admin/user/view_emails.tmpl | 19 +++ 6 files changed, 592 insertions(+) create mode 100644 templates/admin/user/edit.tmpl create mode 100644 templates/admin/user/list.tmpl create mode 100644 templates/admin/user/new.tmpl create mode 100644 templates/admin/user/view.tmpl create mode 100644 templates/admin/user/view_details.tmpl create mode 100644 templates/admin/user/view_emails.tmpl (limited to 'templates/admin/user') diff --git a/templates/admin/user/edit.tmpl b/templates/admin/user/edit.tmpl new file mode 100644 index 0000000..f5c85e9 --- /dev/null +++ b/templates/admin/user/edit.tmpl @@ -0,0 +1,242 @@ +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin edit user")}} +
+

+ {{ctx.Locale.Tr "admin.users.edit_account"}} +

+
+
+ {{template "base/disable_form_autofill"}} + {{.CsrfTokenHtml}} +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +

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

+
+ +
+ + +
+ +
+ + +
+
+ + +
+ +
+ +
+ + +

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

+
+ +
+ +
+
+ + +
+ {{ctx.Locale.Tr "admin.users.activated.description"}} +
+
+
+ + +
+ {{ctx.Locale.Tr "admin.users.block.description"}} +
+
+
+ + +
+ {{ctx.Locale.Tr "admin.users.admin.description"}} +
+
+
+ + +
+ {{ctx.Locale.Tr "admin.users.restricted.description"}} +
+
+
+ + +
+ {{ctx.Locale.Tr "admin.users.allow_git_hook_tooltip"}} +
+
+
+ + +
+ {{ctx.Locale.Tr "admin.users.local_import.description"}} +
+ {{if not .DisableRegularOrgCreation}} +
+
+ + +
+ {{ctx.Locale.Tr "admin.users.organization_creation.description"}} +
+ {{end}} + + {{if .TwoFactorEnabled}} +
+
+
+ + +
+
+ {{end}} + +
+ +
+ + +
+
+
+ +

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

+
+
+ {{.CsrfTokenHtml}} + {{if not .DisableGravatar}} +
+
+ + +
+
+
+ + +
+ {{end}} + +
+
+ + +
+
+ +
+ + +
+ +
+ + +
+
+
+
+ + + +{{template "admin/layout_footer" .}} diff --git a/templates/admin/user/list.tmpl b/templates/admin/user/list.tmpl new file mode 100644 index 0000000..e5d4299 --- /dev/null +++ b/templates/admin/user/list.tmpl @@ -0,0 +1,119 @@ +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin user")}} +
+

+ {{ctx.Locale.Tr "admin.users.user_manage_panel"}} ({{ctx.Locale.Tr "admin.total" .Total}}) + +

+
+
+ + + + + {{template "shared/search/combo" dict "Value" .Keyword "Placeholder" (ctx.Locale.Tr "search.user_kind")}} +
+
+
+ + + + + + + + + + + + + + + + {{range .Users}} + + + + + + + + + {{if .LastLoginUnix}} + + {{else}} + + {{end}} + + + {{end}} + +
ID{{SortArrow "oldest" "newest" .SortType false}} + {{ctx.Locale.Tr "admin.users.name"}} + {{SortArrow "alphabetically" "reversealphabetically" $.SortType true}} + {{ctx.Locale.Tr "email"}}{{ctx.Locale.Tr "admin.users.activated"}}{{ctx.Locale.Tr "admin.users.restricted"}}{{ctx.Locale.Tr "admin.users.2fa"}}{{ctx.Locale.Tr "admin.users.created"}} + {{ctx.Locale.Tr "admin.users.last_login"}} + {{SortArrow "lastlogin" "reverselastlogin" $.SortType false}} +
{{.ID}} + {{.Name}} + {{if .IsAdmin}} + {{ctx.Locale.Tr "admin.users.admin"}} + {{else if eq 2 .Type}}{{/* Reserved user */}} + {{ctx.Locale.Tr "admin.users.reserved"}} + {{else if eq 4 .Type}}{{/* Bot "user" */}} + {{ctx.Locale.Tr "admin.users.bot"}} + {{else if eq 5 .Type}}{{/* Remote user */}} + {{ctx.Locale.Tr "admin.users.remote"}} + {{end}} + {{.Email}}{{if .IsActive}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}{{if .IsRestricted}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}{{if index $.UsersTwoFaStatus .ID}}{{svg "octicon-check"}}{{else}}{{svg "octicon-x"}}{{end}}{{DateTime "short" .CreatedUnix}}{{DateTime "short" .LastLoginUnix}}{{ctx.Locale.Tr "admin.users.never_login"}} + +
+
+ + {{template "base/paginate" .}} +
+{{template "admin/layout_footer" .}} diff --git a/templates/admin/user/new.tmpl b/templates/admin/user/new.tmpl new file mode 100644 index 0000000..b04ebc4 --- /dev/null +++ b/templates/admin/user/new.tmpl @@ -0,0 +1,90 @@ +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin new user")}} +
+

+ {{ctx.Locale.Tr "admin.users.new_account"}} +

+
+
+ {{template "base/disable_form_autofill"}} + {{.CsrfTokenHtml}} + +
+ + +
+ +
+ + +
+ +
+ + +
+
+ + +
+
+ + +
+
+ + +
+ +
+
+ + +
+
+ + + {{if .CanSendEmail}} +
+
+ + +
+
+ {{end}} + +
+ +
+
+
+
+{{template "admin/layout_footer" .}} diff --git a/templates/admin/user/view.tmpl b/templates/admin/user/view.tmpl new file mode 100644 index 0000000..21943a8 --- /dev/null +++ b/templates/admin/user/view.tmpl @@ -0,0 +1,48 @@ +{{template "admin/layout_head" (dict "ctxData" . "pageClass" "admin view user")}} + +
+
+
+

+ {{.Title}} + +

+
+ {{template "admin/user/view_details" .}} +
+
+
+

+ {{ctx.Locale.Tr "admin.emails"}} +
+ {{.EmailsTotal}} +
+

+
+ {{template "admin/user/view_emails" .}} +
+
+
+

+ {{ctx.Locale.Tr "admin.repositories"}} +
+ {{.ReposTotal}} +
+

+
+ {{template "explore/repo_list" .}} +
+

+ {{ctx.Locale.Tr "settings.organization"}} +
+ {{.OrgsTotal}} +
+

+
+ {{template "explore/user_list" .}} +
+
+ +{{template "admin/layout_footer" .}} diff --git a/templates/admin/user/view_details.tmpl b/templates/admin/user/view_details.tmpl new file mode 100644 index 0000000..be2f32b --- /dev/null +++ b/templates/admin/user/view_details.tmpl @@ -0,0 +1,74 @@ +
+
+
+ {{ctx.AvatarUtils.Avatar .User 48}} +
+
+
+ {{template "shared/user/name" .User}} + {{if .User.IsAdmin}} + {{ctx.Locale.Tr "admin.users.admin"}} + {{end}} +
+
+ {{ctx.Locale.Tr "admin.users.auth_source"}}: + {{if eq .LoginSource.ID 0}} + {{ctx.Locale.Tr "admin.users.local"}} + {{else}} + {{.LoginSource.Name}} + {{end}} +
+
+ {{ctx.Locale.Tr "admin.users.activated"}}: + {{if .User.IsActive}} + {{svg "octicon-check"}} + {{else}} + {{svg "octicon-x"}} + {{end}} +
+
+ {{ctx.Locale.Tr "admin.users.restricted"}}: + {{if .User.IsRestricted}} + {{svg "octicon-check"}} + {{else}} + {{svg "octicon-x"}} + {{end}} +
+
+ {{ctx.Locale.Tr "settings.visibility"}}: + {{if .User.Visibility.IsPublic}}{{ctx.Locale.Tr "settings.visibility.public"}}{{end}} + {{if .User.Visibility.IsLimited}}{{ctx.Locale.Tr "settings.visibility.limited"}}{{end}} + {{if .User.Visibility.IsPrivate}}{{ctx.Locale.Tr "settings.visibility.private"}}{{end}} +
+
+ {{ctx.Locale.Tr "admin.users.2fa"}}: + {{if .TwoFactorEnabled}} + {{svg "octicon-check"}} + {{else}} + {{svg "octicon-x"}} + {{end}} +
+ {{if .User.Language}} +
+ + {{ctx.Locale.Tr "settings.language"}}: + {{range .AllLangs}}{{if eq $.User.Language .Lang}}{{.Name}}{{end}}{{end}} + +
+ {{end}} + {{if .User.Location}} +
+ {{svg "octicon-location"}}{{.User.Location}} +
+ {{end}} + {{if .User.Website}} +
+ + {{svg "octicon-link"}} + {{.User.Website}} + +
+ {{end}} +
+
+
diff --git a/templates/admin/user/view_emails.tmpl b/templates/admin/user/view_emails.tmpl new file mode 100644 index 0000000..22ce305 --- /dev/null +++ b/templates/admin/user/view_emails.tmpl @@ -0,0 +1,19 @@ +
+ {{range .Emails}} +
+
+
+ {{.Email}} + {{if .IsPrimary}} +
{{ctx.Locale.Tr "settings.primary"}}
+ {{end}} + {{if .IsActivated}} +
{{ctx.Locale.Tr "settings.activated"}}
+ {{else}} +
{{ctx.Locale.Tr "settings.requires_activation"}}
+ {{end}} +
+
+
+ {{end}} +
-- cgit v1.2.3