Skip to content

Commit

Permalink
Fix template bug of LFS lock (#18784) (#18787)
Browse files Browse the repository at this point in the history
Backport #18784 

Fix #18782
  • Loading branch information
lunny authored Feb 16, 2022
1 parent 1f7802d commit ad78954
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions routers/web/repo/view.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}

Expand Down
2 changes: 1 addition & 1 deletion templates/repo/view_file.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit ad78954

Please sign in to comment.