diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2022-02-17 00:22:25 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-16 11:22:25 -0500 |
commit | f48771ae78b5e5b3caa60c55b3253229ea804ab5 (patch) | |
tree | 727bef5ba98500e90ea5b7c6c9526ff7c4f04b15 | |
parent | 616146f90400bcf80671410c04926d9dc1f11257 (diff) | |
download | gitea-f48771ae78b5e5b3caa60c55b3253229ea804ab5.tar.gz gitea-f48771ae78b5e5b3caa60c55b3253229ea804ab5.zip |
Fix template bug of LFS lock (#18784)
-rw-r--r-- | routers/web/repo/view.go | 1 | ||||
-rw-r--r-- | templates/repo/view_file.tmpl | 2 |
2 files changed, 2 insertions, 1 deletions
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}} <div class="file-info-entry ui tooltip" data-content="{{.LFSLockHint}}"> {{svg "octicon-lock" 16 "mr-2"}} - <a href="{{.LFSLock.Owner.HomeLink}}">{{.LFSLockOwner}}</a> + <a href="{{.LFSLockOwnerHomeLink}}">{{.LFSLockOwner}}</a> </div> {{end}} </div> |