- {{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 13b7d964f7..a15254d041 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 55ecd049b3..60332a5f40 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 a73eb7bbd3..13c60d3945 100644 --- a/templates/org/team/members.tmpl +++ b/templates/org/team/members.tmpl @@ -26,7 +26,7 @@ {{range .Team.Members}}
diff --git a/templates/org/team/teams.tmpl b/templates/org/team/teams.tmpl index 9a7dae8f32..a96dd7d6be 100644 --- a/templates/org/team/teams.tmpl +++ b/templates/org/team/teams.tmpl @@ -32,7 +32,7 @@
{{range .Members}} - {{template "shared/user/avatarlink" dict "Context" $.Context "user" .}} + {{template "shared/user/avatarlink" dict "user" .}} {{end}}
diff --git a/templates/projects/view.tmpl b/templates/projects/view.tmpl index 6689bea220..fe4ea6022f 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 f4f0aa9d6d..e73cf71f6b 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/branch/list.tmpl b/templates/repo/branch/list.tmpl index b32e8cace7..bd045995b2 100644 --- a/templates/repo/branch/list.tmpl +++ b/templates/repo/branch/list.tmpl @@ -27,7 +27,7 @@ {{template "repo/commit_statuses" dict "Status" (index $.CommitStatus .DefaultBranchBranch.DBBranch.CommitID) "Statuses" (index $.CommitStatuses .DefaultBranchBranch.DBBranch.CommitID)}}
-

{{svg "octicon-git-commit" 16 "gt-mr-2"}}{{ShortSha .DefaultBranchBranch.DBBranch.CommitID}} · {{RenderCommitMessage $.Context .DefaultBranchBranch.DBBranch.CommitMessage .RepoLink .Repository.ComposeMetas}} · {{.locale.Tr "org.repo_updated"}} {{TimeSince .DefaultBranchBranch.DBBranch.CommitTime.AsTime .locale}}{{if .DefaultBranchBranch.DBBranch.Pusher}}  {{template "shared/user/avatarlink" dict "Context" $.Context "user" .DefaultBranchBranch.DBBranch.Pusher}}{{template "shared/user/namelink" .DefaultBranchBranch.DBBranch.Pusher}}{{end}}

+

{{svg "octicon-git-commit" 16 "gt-mr-2"}}{{ShortSha .DefaultBranchBranch.DBBranch.CommitID}} · {{RenderCommitMessage $.Context .DefaultBranchBranch.DBBranch.CommitMessage .RepoLink .Repository.ComposeMetas}} · {{.locale.Tr "org.repo_updated"}} {{TimeSince .DefaultBranchBranch.DBBranch.CommitTime.AsTime .locale}}{{if .DefaultBranchBranch.DBBranch.Pusher}}  {{template "shared/user/avatarlink" dict "user" .DefaultBranchBranch.DBBranch.Pusher}}{{template "shared/user/namelink" .DefaultBranchBranch.DBBranch.Pusher}}{{end}}

{{if and $.IsWriter (not $.Repository.IsArchived) (not .IsDeleted)}} @@ -94,7 +94,7 @@ {{template "repo/commit_statuses" dict "Status" (index $.CommitStatus .DBBranch.CommitID) "Statuses" (index $.CommitStatuses .DBBranch.CommitID)}}
-

{{svg "octicon-git-commit" 16 "gt-mr-2"}}{{ShortSha .DBBranch.CommitID}} · {{RenderCommitMessage $.Context .DBBranch.CommitMessage $.RepoLink $.Repository.ComposeMetas}} · {{$.locale.Tr "org.repo_updated"}} {{TimeSince .DBBranch.CommitTime.AsTime $.locale}}{{if .DBBranch.Pusher}}  {{template "shared/user/avatarlink" dict "Context" $.Context "user" .DBBranch.Pusher}}  {{template "shared/user/namelink" .DBBranch.Pusher}}{{end}}

+

{{svg "octicon-git-commit" 16 "gt-mr-2"}}{{ShortSha .DBBranch.CommitID}} · {{RenderCommitMessage $.Context .DBBranch.CommitMessage $.RepoLink $.Repository.ComposeMetas}} · {{$.locale.Tr "org.repo_updated"}} {{TimeSince .DBBranch.CommitTime.AsTime $.locale}}{{if .DBBranch.Pusher}}  {{template "shared/user/avatarlink" dict "user" .DBBranch.Pusher}}  {{template "shared/user/namelink" .DBBranch.Pusher}}{{end}}

{{end}} diff --git a/templates/repo/commit_page.tmpl b/templates/repo/commit_page.tmpl index bd33a30443..06b8f1ba15 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 ef9d065456..9f1d182158 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 57c9fd17ef..ff65d02885 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 ce909fbbf7..2025cac566 100644 --- a/templates/repo/create.tmpl +++ b/templates/repo/create.tmpl @@ -21,18 +21,18 @@