mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 11:28:24 +00:00 
			
		
		
		
	Backport #31013 by wxiaoguang Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
		| @@ -1,4 +1,5 @@ | ||||
| {{$file := .file}} | ||||
| {{$blobExcerptRepoLink := or ctx.RootData.CommitRepoLink ctx.RootData.RepoLink}} | ||||
| <colgroup> | ||||
| 	<col width="50"> | ||||
| 	<col width="10"> | ||||
| @@ -18,17 +19,17 @@ | ||||
| 					<td class="lines-num lines-num-old"> | ||||
| 						<div class="tw-flex"> | ||||
| 						{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5)}} | ||||
| 							<button class="code-expander-button" hx-target="closest tr" hx-get="{{$.root.RepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=split&direction=down&wiki={{$.root.PageIsWiki}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}"> | ||||
| 							<button class="code-expander-button" hx-target="closest tr" hx-get="{{$blobExcerptRepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=split&direction=down&wiki={{$.root.PageIsWiki}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}"> | ||||
| 								{{svg "octicon-fold-down"}} | ||||
| 							</button> | ||||
| 						{{end}} | ||||
| 						{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4)}} | ||||
| 							<button class="code-expander-button" hx-target="closest tr" hx-get="{{$.root.RepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=split&direction=up&wiki={{$.root.PageIsWiki}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}"> | ||||
| 							<button class="code-expander-button" hx-target="closest tr" hx-get="{{$blobExcerptRepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=split&direction=up&wiki={{$.root.PageIsWiki}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}"> | ||||
| 								{{svg "octicon-fold-up"}} | ||||
| 							</button> | ||||
| 						{{end}} | ||||
| 						{{if eq $line.GetExpandDirection 2}} | ||||
| 							<button class="code-expander-button" hx-target="closest tr" hx-get="{{$.root.RepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=split&direction=&wiki={{$.root.PageIsWiki}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}"> | ||||
| 							<button class="code-expander-button" hx-target="closest tr" hx-get="{{$blobExcerptRepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=split&direction=&wiki={{$.root.PageIsWiki}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}"> | ||||
| 								{{svg "octicon-fold"}} | ||||
| 							</button> | ||||
| 						{{end}} | ||||
|   | ||||
| @@ -1,4 +1,5 @@ | ||||
| {{$file := .file}} | ||||
| {{$blobExcerptRepoLink := or ctx.RootData.CommitRepoLink ctx.RootData.RepoLink}} | ||||
| <colgroup> | ||||
| 	<col width="50"> | ||||
| 	<col width="50"> | ||||
| @@ -14,17 +15,17 @@ | ||||
| 					<td colspan="2" class="lines-num"> | ||||
| 						<div class="tw-flex"> | ||||
| 							{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 5)}} | ||||
| 								<button class="code-expander-button" hx-target="closest tr" hx-get="{{$.root.RepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=unified&direction=down&wiki={{$.root.PageIsWiki}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}"> | ||||
| 								<button class="code-expander-button" hx-target="closest tr" hx-get="{{$blobExcerptRepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=unified&direction=down&wiki={{$.root.PageIsWiki}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}"> | ||||
| 									{{svg "octicon-fold-down"}} | ||||
| 								</button> | ||||
| 							{{end}} | ||||
| 							{{if or (eq $line.GetExpandDirection 3) (eq $line.GetExpandDirection 4)}} | ||||
| 								<button class="code-expander-button" hx-target="closest tr" hx-get="{{$.root.RepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=unified&direction=up&wiki={{$.root.PageIsWiki}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}"> | ||||
| 								<button class="code-expander-button" hx-target="closest tr" hx-get="{{$blobExcerptRepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=unified&direction=up&wiki={{$.root.PageIsWiki}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}"> | ||||
| 									{{svg "octicon-fold-up"}} | ||||
| 								</button> | ||||
| 							{{end}} | ||||
| 							{{if eq $line.GetExpandDirection 2}} | ||||
| 								<button class="code-expander-button" hx-target="closest tr" hx-get="{{$.root.RepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=unified&direction=&wiki={{$.root.PageIsWiki}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}"> | ||||
| 								<button class="code-expander-button" hx-target="closest tr" hx-get="{{$blobExcerptRepoLink}}/blob_excerpt/{{PathEscape $.root.AfterCommitID}}?{{$line.GetBlobExcerptQuery}}&style=unified&direction=&wiki={{$.root.PageIsWiki}}&anchor=diff-{{$file.NameHash}}K{{$line.SectionInfo.RightIdx}}"> | ||||
| 									{{svg "octicon-fold"}} | ||||
| 								</button> | ||||
| 							{{end}} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user