From f48771ae78b5e5b3caa60c55b3253229ea804ab5 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Thu, 17 Feb 2022 00:22:25 +0800 Subject: [PATCH] Fix template bug of LFS lock (#18784) --- routers/web/repo/view.go | 1 + templates/repo/view_file.tmpl | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/routers/web/repo/view.go b/routers/web/repo/view.go index 7c6f031907..9ff72b2102 100644 --- a/routers/web/repo/view.go +++ b/routers/web/repo/view.go @@ -464,6 +464,7 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st return } ctx.Data["LFSLockOwner"] = u.DisplayName() + ctx.Data["LFSLockOwnerHomeLink"] = u.HomeLink() ctx.Data["LFSLockHint"] = ctx.Tr("repo.editor.this_file_locked") } diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl index d5308c154b..dc62e249b6 100644 --- a/templates/repo/view_file.tmpl +++ b/templates/repo/view_file.tmpl @@ -24,7 +24,7 @@ {{if .LFSLock}}
{{svg "octicon-lock" 16 "mr-2"}} - {{.LFSLockOwner}} + {{.LFSLockOwner}}
{{end}}