From e68b9d00a6e05b3a941f63ffb696f91e554ac5ec 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.3. Signed-off-by: Daniel Baumann --- templates/shared/user/authorlink.tmpl | 1 + templates/shared/user/avatarlink.tmpl | 1 + templates/shared/user/blocked_users.tmpl | 83 +++++++++++++++++ templates/shared/user/name.tmpl | 1 + templates/shared/user/namelink.tmpl | 1 + templates/shared/user/org_profile_avatar.tmpl | 16 ++++ templates/shared/user/profile_big_avatar.tmpl | 129 ++++++++++++++++++++++++++ 7 files changed, 232 insertions(+) create mode 100644 templates/shared/user/authorlink.tmpl create mode 100644 templates/shared/user/avatarlink.tmpl create mode 100644 templates/shared/user/blocked_users.tmpl create mode 100644 templates/shared/user/name.tmpl create mode 100644 templates/shared/user/namelink.tmpl create mode 100644 templates/shared/user/org_profile_avatar.tmpl create mode 100644 templates/shared/user/profile_big_avatar.tmpl (limited to 'templates/shared/user') diff --git a/templates/shared/user/authorlink.tmpl b/templates/shared/user/authorlink.tmpl new file mode 100644 index 0000000..d57a635 --- /dev/null +++ b/templates/shared/user/authorlink.tmpl @@ -0,0 +1 @@ +{{.GetDisplayName}}{{if .IsBot}}bot{{end}} diff --git a/templates/shared/user/avatarlink.tmpl b/templates/shared/user/avatarlink.tmpl new file mode 100644 index 0000000..5e3ed7a --- /dev/null +++ b/templates/shared/user/avatarlink.tmpl @@ -0,0 +1 @@ +{{ctx.AvatarUtils.Avatar .user}} diff --git a/templates/shared/user/blocked_users.tmpl b/templates/shared/user/blocked_users.tmpl new file mode 100644 index 0000000..e83a039 --- /dev/null +++ b/templates/shared/user/blocked_users.tmpl @@ -0,0 +1,83 @@ +

+ {{ctx.Locale.Tr "user.block.title"}} +

+
+

{{ctx.Locale.Tr "user.block.info_1"}}

+
    +
  • {{ctx.Locale.Tr "user.block.info_2"}}
  • +
  • {{ctx.Locale.Tr "user.block.info_3"}}
  • +
  • {{ctx.Locale.Tr "user.block.info_4"}}
  • +
  • {{ctx.Locale.Tr "user.block.info_5"}}
  • +
  • {{ctx.Locale.Tr "user.block.info_6"}}
  • +
  • {{ctx.Locale.Tr "user.block.info_7"}}
  • +
+
+
+
+ {{.CsrfTokenHtml}} + + +
+ + +

{{ctx.Locale.Tr "user.block.note.info"}}

+
+
+
+

+ {{ctx.Locale.Tr "user.block.list"}} +

+
+
+ {{range .UserBlocks}} +
+
+ {{ctx.AvatarUtils.Avatar .Blockee}} +
+
+ + {{if .Note}} +
+ {{ctx.Locale.Tr "user.block.note"}}: {{.Note}} +
+ {{end}} +
+
+ +
+ {{$.CsrfTokenHtml}} + + + +
+
+
+ {{else}} +
{{ctx.Locale.Tr "user.block.list.none"}}
+ {{end}} +
+
+ diff --git a/templates/shared/user/name.tmpl b/templates/shared/user/name.tmpl new file mode 100644 index 0000000..896349f --- /dev/null +++ b/templates/shared/user/name.tmpl @@ -0,0 +1 @@ +{{.Name}}{{if .FullName}} ({{.FullName}}){{end}} diff --git a/templates/shared/user/namelink.tmpl b/templates/shared/user/namelink.tmpl new file mode 100644 index 0000000..a122f4f --- /dev/null +++ b/templates/shared/user/namelink.tmpl @@ -0,0 +1 @@ +{{.GetDisplayName}} diff --git a/templates/shared/user/org_profile_avatar.tmpl b/templates/shared/user/org_profile_avatar.tmpl new file mode 100644 index 0000000..c0abcab --- /dev/null +++ b/templates/shared/user/org_profile_avatar.tmpl @@ -0,0 +1,16 @@ +{{with .ContextUser}} +
+
+
+
+ {{ctx.AvatarUtils.Avatar . 100}} + {{.DisplayName}} + + {{if .Visibility.IsLimited}}
{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}
{{end}} + {{if .Visibility.IsPrivate}}
{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}
{{end}} +
+
+
+
+
+{{end}} diff --git a/templates/shared/user/profile_big_avatar.tmpl b/templates/shared/user/profile_big_avatar.tmpl new file mode 100644 index 0000000..d3033b4 --- /dev/null +++ b/templates/shared/user/profile_big_avatar.tmpl @@ -0,0 +1,129 @@ +{{if .IsHTMX}} + {{template "base/alert" .}} +{{end}} +
+ +
+ {{if .ContextUser.FullName}}{{.ContextUser.FullName}}{{end}} + {{.ContextUser.Name}}{{if .ContextUser.Pronouns}} · {{.ContextUser.Pronouns}}{{end}} {{if .IsAdmin}} + + {{svg "octicon-gear" 18}} + + {{end}} + +
+
+
    + {{if .ContextUser.Location}} +
  • + {{svg "octicon-location"}} + {{.ContextUser.Location}} + {{if .ContextUserLocationMapURL}} + + {{svg "octicon-link-external"}} + + {{end}} +
  • + {{end}} + {{if .ShowUserEmail}} +
  • + {{svg "octicon-mail"}} + {{.ContextUser.Email}} + {{if (eq .SignedUserID .ContextUser.ID)}} + + + {{svg "octicon-unlock"}} + + + {{end}} +
  • + {{end}} + {{if .ContextUser.Website}} +
  • + {{svg "octicon-link"}} + {{.ContextUser.Website}} +
  • + {{end}} + {{if $.RenderedDescription}} +
  • +
    {{$.RenderedDescription}}
    +
  • + {{end}} + {{range .OpenIDs}} + {{if .Show}} +
  • + {{svg "fontawesome-openid"}} + {{.URI}} +
  • + {{end}} + {{end}} +
  • {{svg "octicon-calendar"}} {{ctx.Locale.Tr "user.joined_on" (DateTime "short" .ContextUser.CreatedUnix)}}
  • + {{if and .Orgs .HasOrgsVisible}} +
  • +
      + {{range .Orgs}} + {{if (or .Visibility.IsPublic (and ($.SignedUser) (or .Visibility.IsLimited (and (.HasMemberWithUserID ctx $.SignedUserID) .Visibility.IsPrivate) ($.IsAdmin))))}} +
    • + + {{ctx.AvatarUtils.Avatar .}} + +
    • + {{end}} + {{end}} +
    +
  • + {{end}} + {{if .Badges}} +
  • +
      + {{range .Badges}} +
    • + {{.Description}} +
    • + {{end}} +
    +
  • + {{end}} + {{if and .IsSigned (ne .SignedUserID .ContextUser.ID)}} + +
  • + {{if $.IsBlocked}} + + {{else}} + + {{end}} +
  • + {{end}} +
+
+
-- cgit v1.2.3