- {{avatar .Org 140 "org-avatar"}} + {{avatar $.Context .Org 140 "org-avatar"}}
{{.Org.DisplayName}} @@ -52,7 +52,7 @@ {{range .Members}} {{if or $isMember (call $.IsPublicMember .ID)}} - {{avatar .}} + {{avatar $.Context .}} {{end}} {{end}} diff --git a/templates/org/member/members.tmpl b/templates/org/member/members.tmpl index b4f788e52308..b76cb9778f95 100644 --- a/templates/org/member/members.tmpl +++ b/templates/org/member/members.tmpl @@ -8,7 +8,7 @@ {{range .Members}}
- {{avatar . 48}} + {{avatar $.Context . 48}}
{{.FullName}}
diff --git a/templates/org/team/invite.tmpl b/templates/org/team/invite.tmpl index ef365dee3a0d..55ecd049b39d 100644 --- a/templates/org/team/invite.tmpl +++ b/templates/org/team/invite.tmpl @@ -4,7 +4,7 @@ {{template "base/alert" .}}
- {{avatar .Organization 140}} + {{avatar $.Context .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 13bd6c5b5db2..6ea1614753ab 100644 --- a/templates/org/team/members.tmpl +++ b/templates/org/team/members.tmpl @@ -35,7 +35,7 @@ {{end}} - {{avatar .}} + {{avatar $.Context .}} {{.DisplayName}}
diff --git a/templates/org/team/teams.tmpl b/templates/org/team/teams.tmpl index 66ac4a421196..df0620af4903 100644 --- a/templates/org/team/teams.tmpl +++ b/templates/org/team/teams.tmpl @@ -32,7 +32,7 @@
{{range .Members}} - {{template "shared/user/avatarlink" .}} + {{template "shared/user/avatarlink" Dict "Context" $.Context "user" .}} {{end}}
diff --git a/templates/repo/commit_page.tmpl b/templates/repo/commit_page.tmpl index 632212c8c54d..a0cd12674a4d 100644 --- a/templates/repo/commit_page.tmpl +++ b/templates/repo/commit_page.tmpl @@ -146,24 +146,24 @@
{{if .Author}} - {{avatar .Author 28 "gt-mr-3"}} + {{avatar $.Context .Author 28 "gt-mr-3"}} {{if .Author.FullName}} {{.Author.FullName}} {{else}} {{.Commit.Author.Name}} {{end}} {{else}} - {{avatarByEmail .Commit.Author.Email .Commit.Author.Email 28 "gt-mr-3"}} + {{avatarByEmail $.Context .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 .Verification.CommittingUser 28 "gt-mx-3"}} + {{avatar $.Context .Verification.CommittingUser 28 "gt-mx-3"}} {{.Commit.Committer.Name}} {{else}} - {{avatarByEmail .Commit.Committer.Email .Commit.Committer.Name 28 "gt-mr-3"}} + {{avatarByEmail $.Context .Commit.Committer.Email .Commit.Committer.Name 28 "gt-mr-3"}} {{.Commit.Committer.Name}} {{end}} {{end}} @@ -200,12 +200,12 @@ {{else}} {{.locale.Tr "repo.commits.signed_by_untrusted_user_unmatched"}}: {{end}} - {{avatar .Verification.SigningUser 28 "gt-mr-3"}} + {{avatar $.Context .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 .Verification.SigningEmail "" 28}} + {{avatarByEmail $.Context .Verification.SigningEmail "" 28}} {{.Verification.SigningUser.GetDisplayName}} {{end}} {{else}} diff --git a/templates/repo/commits_list.tmpl b/templates/repo/commits_list.tmpl index bef24e43e3ec..4341a428b797 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 .User 28 "gt-mr-2"}}{{$userName}} + {{avatar $.Context .User 28 "gt-mr-2"}}{{$userName}} {{else}} - {{avatarByEmail .Author.Email .Author.Name 28 "gt-mr-2"}} + {{avatarByEmail $.Context .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 4a4e7f12f91a..49457b47fc57 100644 --- a/templates/repo/commits_list_small.tmpl +++ b/templates/repo/commits_list_small.tmpl @@ -7,10 +7,10 @@ {{svg "octicon-git-commit"}} {{if .User}} - {{avatar .User}} + {{avatar $.root.Context .User}} {{else}} - {{avatarByEmail .Author.Email .Author.Name}} + {{avatarByEmail $.root.Context .Author.Email .Author.Name}} {{end}} diff --git a/templates/repo/create.tmpl b/templates/repo/create.tmpl index 94f6f95173c7..1f8e1f59df79 100644 --- a/templates/repo/create.tmpl +++ b/templates/repo/create.tmpl @@ -21,18 +21,18 @@