mirror of
https://github.com/go-gitea/gitea
synced 2025-08-09 19:18:20 +00:00
Use template context function for avatar rendering (#26385)
Introduce `AvatarUtils`, no need to pass `$.Context` to every sub-template, and simplify the template helper functions.
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
{{template "base/alert" .}}
|
||||
<div class="ui centered card">
|
||||
<div class="image">
|
||||
{{avatar $.Context .Organization 140}}
|
||||
{{ctx.AvatarUtils.Avatar .Organization 140}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="header">{{.locale.Tr "org.teams.invite.title" .Team.Name .Organization.Name | Str2html}}</div>
|
||||
|
Reference in New Issue
Block a user