- {{avatar $.Context .Org 140 "org-avatar"}} + {{ctx.AvatarUtils.Avatar .Org 140 "org-avatar"}}
{{.Org.DisplayName}} @@ -61,7 +61,7 @@ {{$isMember := .IsOrganizationMember}} {{range .Members}} {{if or $isMember (call $.IsPublicMember .ID)}} - {{avatar $.Context . 48}} + {{ctx.AvatarUtils.Avatar . 48}} {{end}} {{end}}
diff --git a/templates/org/member/members.tmpl b/templates/org/member/members.tmpl index 13b7d964f73a9..a15254d0418d5 100644 --- a/templates/org/member/members.tmpl +++ b/templates/org/member/members.tmpl @@ -9,7 +9,7 @@ {{$isPublic := index $.MembersIsPublicMember .ID}}
diff --git a/templates/org/team/invite.tmpl b/templates/org/team/invite.tmpl index 55ecd049b39d0..60332a5f4070b 100644 --- a/templates/org/team/invite.tmpl +++ b/templates/org/team/invite.tmpl @@ -4,7 +4,7 @@ {{template "base/alert" .}}
- {{avatar $.Context .Organization 140}} + {{ctx.AvatarUtils.Avatar .Organization 140}}
{{.locale.Tr "org.teams.invite.title" .Team.Name .Organization.Name | Str2html}}
diff --git a/templates/org/team/members.tmpl b/templates/org/team/members.tmpl index 4a97763d9aa22..a53672e62f989 100644 --- a/templates/org/team/members.tmpl +++ b/templates/org/team/members.tmpl @@ -26,7 +26,7 @@ {{range .Team.Members}}
diff --git a/templates/projects/view.tmpl b/templates/projects/view.tmpl index 6689bea2202e0..fe4ea6022f4fc 100644 --- a/templates/projects/view.tmpl +++ b/templates/projects/view.tmpl @@ -234,7 +234,7 @@ {{end}}
diff --git a/templates/repo/actions/list.tmpl b/templates/repo/actions/list.tmpl index f4f0aa9d6d957..e73cf71f6beed 100644 --- a/templates/repo/actions/list.tmpl +++ b/templates/repo/actions/list.tmpl @@ -33,7 +33,7 @@ {{range .Actors}} - {{avatar $.Context . 20}} {{.GetDisplayName}} + {{ctx.AvatarUtils.Avatar . 20}} {{.GetDisplayName}} {{end}}
diff --git a/templates/repo/commit_page.tmpl b/templates/repo/commit_page.tmpl index bd33a304435a1..06b8f1ba155ed 100644 --- a/templates/repo/commit_page.tmpl +++ b/templates/repo/commit_page.tmpl @@ -142,24 +142,24 @@
{{if .Author}} - {{avatar $.Context .Author 28 "gt-mr-3"}} + {{ctx.AvatarUtils.Avatar .Author 28 "gt-mr-3"}} {{if .Author.FullName}} {{.Author.FullName}} {{else}} {{.Commit.Author.Name}} {{end}} {{else}} - {{avatarByEmail $.Context .Commit.Author.Email .Commit.Author.Email 28 "gt-mr-3"}} + {{ctx.AvatarUtils.AvatarByEmail .Commit.Author.Email .Commit.Author.Email 28 "gt-mr-3"}} {{.Commit.Author.Name}} {{end}} {{TimeSince .Commit.Author.When $.locale}} {{if or (ne .Commit.Committer.Name .Commit.Author.Name) (ne .Commit.Committer.Email .Commit.Author.Email)}} {{.locale.Tr "repo.diff.committed_by"}} {{if ne .Verification.CommittingUser.ID 0}} - {{avatar $.Context .Verification.CommittingUser 28 "gt-mx-3"}} + {{ctx.AvatarUtils.Avatar .Verification.CommittingUser 28 "gt-mx-3"}} {{.Commit.Committer.Name}} {{else}} - {{avatarByEmail $.Context .Commit.Committer.Email .Commit.Committer.Name 28 "gt-mr-3"}} + {{ctx.AvatarUtils.AvatarByEmail .Commit.Committer.Email .Commit.Committer.Name 28 "gt-mr-3"}} {{.Commit.Committer.Name}} {{end}} {{end}} @@ -196,12 +196,12 @@ {{else}} {{.locale.Tr "repo.commits.signed_by_untrusted_user_unmatched"}}: {{end}} - {{avatar $.Context .Verification.SigningUser 28 "gt-mr-3"}} + {{ctx.AvatarUtils.Avatar .Verification.SigningUser 28 "gt-mr-3"}} {{.Verification.SigningUser.GetDisplayName}} {{else}} {{svg "gitea-lock-cog" 16 "gt-mr-3"}} {{.locale.Tr "repo.commits.signed_by"}}: - {{avatarByEmail $.Context .Verification.SigningEmail "" 28}} + {{ctx.AvatarUtils.AvatarByEmail .Verification.SigningEmail "" 28}} {{.Verification.SigningUser.GetDisplayName}} {{end}} {{else}} diff --git a/templates/repo/commits_list.tmpl b/templates/repo/commits_list.tmpl index ef9d0654566f5..9f1d182158dcd 100644 --- a/templates/repo/commits_list.tmpl +++ b/templates/repo/commits_list.tmpl @@ -18,9 +18,9 @@ {{if .User.FullName}} {{$userName = .User.FullName}} {{end}} - {{avatar $.Context .User 28 "gt-mr-2"}}{{$userName}} + {{ctx.AvatarUtils.Avatar .User 28 "gt-mr-2"}}{{$userName}} {{else}} - {{avatarByEmail $.Context .Author.Email .Author.Name 28 "gt-mr-2"}} + {{ctx.AvatarUtils.AvatarByEmail .Author.Email .Author.Name 28 "gt-mr-2"}} {{$userName}} {{end}} diff --git a/templates/repo/commits_list_small.tmpl b/templates/repo/commits_list_small.tmpl index 57c9fd17ef775..ff65d02885388 100644 --- a/templates/repo/commits_list_small.tmpl +++ b/templates/repo/commits_list_small.tmpl @@ -6,9 +6,9 @@
{{svg "octicon-git-commit"}} {{if .User}} - {{avatar $.root.Context .User}} + {{ctx.AvatarUtils.Avatar .User}} {{else}} - {{avatarByEmail $.root.Context .Author.Email .Author.Name}} + {{ctx.AvatarUtils.AvatarByEmail .Author.Email .Author.Name}} {{end}} {{$commitLink:= printf "%s/commit/%s" $.comment.Issue.PullRequest.BaseRepo.Link (PathEscape .ID.String)}} diff --git a/templates/repo/create.tmpl b/templates/repo/create.tmpl index ce909fbbf7bf7..2025cac566761 100644 --- a/templates/repo/create.tmpl +++ b/templates/repo/create.tmpl @@ -21,18 +21,18 @@ diff --git a/templates/repo/issue/new_form.tmpl b/templates/repo/issue/new_form.tmpl index aa680217487bf..272693e63eddd 100644 --- a/templates/repo/issue/new_form.tmpl +++ b/templates/repo/issue/new_form.tmpl @@ -8,7 +8,7 @@
- {{avatar $.Context .SignedUser 40}} + {{ctx.AvatarUtils.Avatar .SignedUser 40}}
@@ -160,7 +160,7 @@ - {{avatar $.Context . 28 "gt-mr-3"}}{{template "repo/search_name" .}} + {{ctx.AvatarUtils.Avatar . 28 "gt-mr-3"}}{{template "repo/search_name" .}} {{end}} @@ -173,7 +173,7 @@ diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl index ab8da434ee579..f6572d49653a4 100644 --- a/templates/repo/issue/view_content.tmpl +++ b/templates/repo/issue/view_content.tmpl @@ -16,7 +16,7 @@ {{else}} - {{avatar $.Context .Issue.Poster 40}} + {{ctx.AvatarUtils.Avatar .Issue.Poster 40}} {{end}}
@@ -35,7 +35,7 @@ {{else}} - {{avatar $.Context .Issue.Poster 24}} + {{ctx.AvatarUtils.Avatar .Issue.Poster 24}} {{template "shared/user/authorlink" .Issue.Poster}} @@ -93,7 +93,7 @@ {{if and (or .IsRepoAdmin .HasIssuesOrPullsWritePermission (not .Issue.IsLocked)) (not .Repository.IsArchived)}}
- {{avatar $.Context .SignedUser 40}} + {{ctx.AvatarUtils.Avatar .SignedUser 40}}
diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl index 5dbd530fa560b..063e8ff080797 100644 --- a/templates/repo/issue/view_content/comments.tmpl +++ b/templates/repo/issue/view_content/comments.tmpl @@ -20,7 +20,7 @@ {{else}} - {{avatar $.Context .Poster 40}} + {{ctx.AvatarUtils.Avatar .Poster 40}} {{end}}
@@ -40,7 +40,7 @@ {{else}} {{if gt .Poster.ID 0}} - {{avatar $.Context .Poster 24}} + {{ctx.AvatarUtils.Avatar .Poster 24}} {{end}} @@ -386,7 +386,7 @@ bubble. The condition depends on review type and for positive reviews whether there is a comment element or not */}} - {{avatar $.Context .Poster 40}} + {{ctx.AvatarUtils.Avatar .Poster 40}} {{end}} {{svg (printf "octicon-%s" .Review.Type.Icon)}} @@ -423,7 +423,7 @@
{{if gt .Poster.ID 0}} - {{avatar $.Context .Poster 24}} + {{ctx.AvatarUtils.Avatar .Poster 24}} {{end}} @@ -549,7 +549,7 @@
{{if not .OriginalAuthor}} - {{avatar $.Context .Poster 20}} + {{ctx.AvatarUtils.Avatar .Poster 20}} {{end}} @@ -799,7 +799,7 @@
{{if gt .Poster.ID 0}} - {{avatar $.Context .Poster 24}} + {{ctx.AvatarUtils.Avatar .Poster 24}} {{end}} diff --git a/templates/repo/issue/view_content/sidebar.tmpl b/templates/repo/issue/view_content/sidebar.tmpl index 15845665bb20a..70aa8e53c0cba 100644 --- a/templates/repo/issue/view_content/sidebar.tmpl +++ b/templates/repo/issue/view_content/sidebar.tmpl @@ -22,7 +22,7 @@ {{svg "octicon-check"}} - {{avatar $.Context .User 28 "gt-mr-3"}}{{template "repo/search_name" .User}} + {{ctx.AvatarUtils.Avatar .User 28 "gt-mr-3"}}{{template "repo/search_name" .User}} {{end}} @@ -51,7 +51,7 @@
{{if .User}} - {{avatar $.Context .User 20 "gt-mr-3"}}{{.User.GetDisplayName}} + {{ctx.AvatarUtils.Avatar .User 20 "gt-mr-3"}}{{.User.GetDisplayName}} {{else if .Team}} {{svg "octicon-people" 20 "gt-mr-3"}}{{$.Issue.Repo.OwnerName}}/{{.Team.Name}} {{end}} @@ -231,7 +231,7 @@ {{end}} {{svg "octicon-check"}} - {{avatar $.Context . 20 "gt-mr-3"}}{{template "repo/search_name" .}} + {{ctx.AvatarUtils.Avatar . 20 "gt-mr-3"}}{{template "repo/search_name" .}} {{end}} @@ -243,7 +243,7 @@ {{range .Issue.Assignees}} @@ -258,7 +258,7 @@ @@ -347,7 +347,7 @@ {{range $user, $trackedtime := .WorkingUsers}}
- {{avatar $.Context $user}} + {{ctx.AvatarUtils.Avatar $user}}
{{template "shared/user/authorlink" $user}} diff --git a/templates/repo/migrate/codebase.tmpl b/templates/repo/migrate/codebase.tmpl index 3d46b14cccaee..db607eebb4c75 100644 --- a/templates/repo/migrate/codebase.tmpl +++ b/templates/repo/migrate/codebase.tmpl @@ -62,18 +62,18 @@