From ad789542b874d4a5a1aa8e9732eb200f48f38830 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Thu, 17 Feb 2022 01:16:04 +0800 Subject: [PATCH] Fix template bug of LFS lock (#18784) (#18787) Backport #18784 Fix #18782 --- 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 4c0e881f17..e98d94f7ca 100644 --- a/routers/web/repo/view.go +++ b/routers/web/repo/view.go @@ -465,6 +465,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}}