mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +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:
@@ -14,7 +14,7 @@
|
||||
{{range .Orgs}}
|
||||
<div class="flex-item">
|
||||
<div class="flex-item-leading">
|
||||
{{avatar $.Context . 28 "mini"}}
|
||||
{{ctx.AvatarUtils.Avatar . 28 "mini"}}
|
||||
</div>
|
||||
<div class="flex-item-main">
|
||||
<div class="flex-item-title">{{template "shared/user/name" .}}</div>
|
||||
|
Reference in New Issue
Block a user