mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-03 21:54:23 +00:00
refactor: clean up fragile diff render templates, use backend typed structs (#38517)
Blob.Size requires a context after the repository context removal
(5b078f72aa).
Actually the template code should just render, it should not depend on
the fragile dynamic calls to backend functions.
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
{{$root := ctx.RootData}}
|
||||
{{$file := $.file}}
|
||||
<tr>
|
||||
<td>
|
||||
{{$result := call .root.CreateCsvDiff .file .blobBase .blobHead}}
|
||||
{{$result := call $root.CreateCsvDiff $file $file.LeftBlob $file.RightBlob}}
|
||||
{{if $result.Error}}
|
||||
<div class="ui center">{{$result.Error}}</div>
|
||||
{{else if $result.Sections}}
|
||||
|
||||
Reference in New Issue
Block a user