mirror of
https://github.com/go-gitea/gitea
synced 2025-07-23 02:38:35 +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:
@@ -1,5 +1,5 @@
|
||||
<div class="commit-form-wrapper">
|
||||
{{avatar $.Context .SignedUser 48 "commit-avatar"}}
|
||||
{{ctx.AvatarUtils.Avatar .SignedUser 48 "commit-avatar"}}
|
||||
<div class="commit-form">
|
||||
<h3>{{- if .CanCommitToBranch.WillSign}}
|
||||
<span title="{{.locale.Tr "repo.signing.will_sign" .CanCommitToBranch.SigningKey}}">{{svg "octicon-lock" 24}}</span>
|
||||
|
Reference in New Issue
Block a user