Skip to content

Commit

Permalink
Fix template bug of LFS lock (go-gitea#18784)
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny committed Feb 16, 2022
1 parent 1f7802d commit 84c5725
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 84c5725

Please sign in to comment.