Fix template bug of LFS lock (#18784)

tokarchuk/v1.17
Lunny Xiao 3 years ago committed by GitHub
parent 616146f904
commit f48771ae78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      routers/web/repo/view.go
  2. 2
      templates/repo/view_file.tmpl

@ -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")
}

@ -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>

Loading…
Cancel
Save