mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Fix template bug of LFS lock (#18784)
This commit is contained in:
		@@ -464,6 +464,7 @@ func renderFile(ctx *context.Context, entry *git.TreeEntry, treeLink, rawLink st
 | 
				
			|||||||
			return
 | 
								return
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		ctx.Data["LFSLockOwner"] = u.DisplayName()
 | 
							ctx.Data["LFSLockOwner"] = u.DisplayName()
 | 
				
			||||||
 | 
							ctx.Data["LFSLockOwnerHomeLink"] = u.HomeLink()
 | 
				
			||||||
		ctx.Data["LFSLockHint"] = ctx.Tr("repo.editor.this_file_locked")
 | 
							ctx.Data["LFSLockHint"] = ctx.Tr("repo.editor.this_file_locked")
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -24,7 +24,7 @@
 | 
				
			|||||||
					{{if .LFSLock}}
 | 
										{{if .LFSLock}}
 | 
				
			||||||
						<div class="file-info-entry ui tooltip" data-content="{{.LFSLockHint}}">
 | 
											<div class="file-info-entry ui tooltip" data-content="{{.LFSLockHint}}">
 | 
				
			||||||
							{{svg "octicon-lock" 16 "mr-2"}}
 | 
												{{svg "octicon-lock" 16 "mr-2"}}
 | 
				
			||||||
							<a href="{{.LFSLock.Owner.HomeLink}}">{{.LFSLockOwner}}</a>
 | 
												<a href="{{.LFSLockOwnerHomeLink}}">{{.LFSLockOwner}}</a>
 | 
				
			||||||
						</div>
 | 
											</div>
 | 
				
			||||||
					{{end}}
 | 
										{{end}}
 | 
				
			||||||
				</div>
 | 
									</div>
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user