summaryrefslogtreecommitdiffstats
path: root/templates/projects
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-08-10 11:19:39 +0800
committerGitHub <noreply@github.com>2023-08-10 11:19:39 +0800
commita370efc13f0e1ea309e324639832832bc14cb6dc (patch)
tree3c408cf225a4ffcc49f257fabf162831c92e23bf /templates/projects
parent36eb3c433ae384f21beec63eb648141fb9dba676 (diff)
downloadgitea-a370efc13f0e1ea309e324639832832bc14cb6dc.tar.gz
gitea-a370efc13f0e1ea309e324639832832bc14cb6dc.zip
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.
Diffstat (limited to 'templates/projects')
-rw-r--r--templates/projects/view.tmpl2
1 files changed, 1 insertions, 1 deletions
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}}
<div class="right floated">
{{range .Assignees}}
- <a target="_blank" href="{{.HomeLink}}" data-tooltip-content="{{$.locale.Tr "repo.projects.column.assigned_to"}} {{.Name}}">{{avatar $.Context . 28 "mini gt-mr-3"}}</a>
+ <a target="_blank" href="{{.HomeLink}}" data-tooltip-content="{{$.locale.Tr "repo.projects.column.assigned_to"}} {{.Name}}">{{ctx.AvatarUtils.Avatar . 28 "mini gt-mr-3"}}</a>
{{end}}
</div>
</div>