mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Improved comment rendering in "Files" view by adding Comments to DiffLine
Signed-off-by: Jonas Franz <info@jonasfranz.software>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{{$file := .}}
|
||||
{{$file := .file}}
|
||||
{{$highlightClass := $file.GetHighlightClass}}
|
||||
{{range $j, $section := $file.Sections}}
|
||||
{{range $k, $line := $section.Lines}}
|
||||
@@ -20,5 +20,19 @@
|
||||
<pre><code class="wrap {{if $highlightClass}}language-{{$highlightClass}}{{else}}nohighlight{{end}}">{{$section.GetComputedInlineDiffFor $line}}</code></pre>
|
||||
</td>
|
||||
</tr>
|
||||
{{if gt (len $line.Comments) 0}}
|
||||
<tr>
|
||||
<td colspan="4" class="add-comment-left add-comment-right">
|
||||
<div class="field comment-code-cloud">
|
||||
<div class="comment-list">
|
||||
<ui class="ui comments">
|
||||
{{ template "repo/diff/comments" dict "root" $.root "comments" $line.Comments}}
|
||||
</ui>
|
||||
</div>
|
||||
{{template "repo/diff/comment_form" $.root }}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
|
Reference in New Issue
Block a user