mirror of
https://github.com/go-gitea/gitea
synced 2025-01-03 13:06:02 +01:00
Show add button only if no comments already exist for the line
Signed-off-by: Jonas Franz <info@jonasfranz.software>
This commit is contained in:
parent
7592f5bbbd
commit
4cb3a60f16
@ -104,7 +104,9 @@
|
||||
|
||||
</td>
|
||||
<td class="lines-code lines-code-old halfwidth">
|
||||
<a class="ui green button add-code-comment add-code-comment-left" data-path="{{$file.Name}}" data-side="left" data-idx="{{$line.LeftIdx}}">+</a>
|
||||
{{if not (len $line.Comments)}}
|
||||
<a class="ui green button add-code-comment add-code-comment-right" data-path="{{$file.Name}}" data-side="right" data-idx="{{$line.RightIdx}}">+</a>
|
||||
{{end}}
|
||||
<pre><code class="wrap {{if $highlightClass}}language-{{$highlightClass}}{{else}}nohighlight{{end}}">{{if $line.LeftIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}</code></pre>
|
||||
</td>
|
||||
<td class="lines-num lines-num-new">
|
||||
@ -112,7 +114,9 @@
|
||||
</td>
|
||||
|
||||
<td class="lines-code lines-code-new halfwidth">
|
||||
<a class="ui green button add-code-comment add-code-comment-right" data-path="{{$file.Name}}" data-side="right" data-idx="{{$line.RightIdx}}">+</a>
|
||||
{{if not (len $line.Comments)}}
|
||||
<a class="ui green button add-code-comment add-code-comment-right" data-path="{{$file.Name}}" data-side="right" data-idx="{{$line.RightIdx}}">+</a>
|
||||
{{end}}
|
||||
<pre><code class="wrap {{if $highlightClass}}language-{{$highlightClass}}{{else}}nohighlight{{end}}">{{if $line.RightIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}</code></pre>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -16,7 +16,9 @@
|
||||
</td>
|
||||
{{end}}
|
||||
<td class="lines-code {{if (not $line.RightIdx)}}lines-code-old{{end}}">
|
||||
<a class="ui green button add-code-comment add-code-comment-{{if $line.RightIdx}}right{{else}}left{{end}}" data-path="{{$file.Name}}" data-side="{{if $line.RightIdx}}right{{else}}left{{end}}" data-idx="{{if $line.RightIdx}}{{$line.RightIdx}}{{else}}{{$line.LeftIdx}}{{end}}">+</a>
|
||||
{{if not (len $line.Comments)}}
|
||||
<a class="ui green button add-code-comment add-code-comment-{{if $line.RightIdx}}right{{else}}left{{end}}" data-path="{{$file.Name}}" data-side="{{if $line.RightIdx}}right{{else}}left{{end}}" data-idx="{{if $line.RightIdx}}{{$line.RightIdx}}{{else}}{{$line.LeftIdx}}{{end}}">+</a>
|
||||
{{end}}
|
||||
<pre><code class="wrap {{if $highlightClass}}language-{{$highlightClass}}{{else}}nohighlight{{end}}">{{$section.GetComputedInlineDiffFor $line}}</code></pre>
|
||||
</td>
|
||||
</tr>
|
||||
|
Loading…
Reference in New Issue
Block a user