File tree 2 files changed +15
-6
lines changed 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 8
8
<div class="ui right">
9
9
<a class="ui tiny basic toggle button" href="?style={{if .IsSplitStyle}}unified{{else}}split{{end}}">{{ if .IsSplitStyle }}{{.i18n.Tr "repo.diff.show_unified_view"}}{{else}}{{.i18n.Tr "repo.diff.show_split_view"}}{{end}}</a>
10
10
<a class="ui tiny basic toggle button" data-target="#diff-files">{{.i18n.Tr "repo.diff.show_diff_stats"}}</a>
11
- {{template "repo/diff/new_review" .}}
11
+ {{if .IsSigned}}
12
+ {{template "repo/diff/new_review" .}}
13
+ {{end}}
12
14
</div>
13
15
</div>
14
16
<ol class="detail-files hide" id="diff-files">
104
106
105
107
</td>
106
108
<td class="lines-code lines-code-old halfwidth">
107
- {{if not (len $line.Comments)}}
109
+ {{if and $.IsSigned ( not (len $line.Comments) )}}
108
110
<a class="ui green button add-code-comment add-code-comment-right" data-path="{{$file.Name}}" data-side="right" data-idx="{{$line.RightIdx}}">+</a>
109
111
{{end}}
110
112
<pre><code class="wrap {{if $highlightClass}}language-{{$highlightClass}}{{else}}nohighlight{{end}}">{{if $line.LeftIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}</code></pre>
114
116
</td>
115
117
116
118
<td class="lines-code lines-code-new halfwidth">
117
- {{if not (len $line.Comments)}}
119
+ {{if and $.IsSigned ( not (len $line.Comments) )}}
118
120
<a class="ui green button add-code-comment add-code-comment-right" data-path="{{$file.Name}}" data-side="right" data-idx="{{$line.RightIdx}}">+</a>
119
121
{{end}}
120
122
<pre><code class="wrap {{if $highlightClass}}language-{{$highlightClass}}{{else}}nohighlight{{end}}">{{if $line.RightIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}</code></pre>
129
131
{{ template "repo/diff/comments" dict "root" $ "comments" $line.Comments}}
130
132
</ui>
131
133
</div>
132
- {{template "repo/diff/comment_form_datahandler" dict "root" $ "comment" (index $line.Comments 0)}}
134
+ {{if $.IsSigned}}
135
+ {{template "repo/diff/comment_form_datahandler" dict "root" $ "comment" (index $line.Comments 0)}}
136
+ {{end}}
137
+ {{printf "%v" $}}
138
+ <hr>
139
+ {{printf "%v" $.IsSigned}}
133
140
</div>
134
141
</td>
135
142
</tr>
Original file line number Diff line number Diff line change 16
16
</td>
17
17
{{end}}
18
18
<td class="lines-code {{if (not $line.RightIdx)}}lines-code-old{{end}}">
19
- {{if not (len $line.Comments)}}
19
+ {{if and $.IsSigned ( not (len $line.Comments) )}}
20
20
<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>
21
21
{{end}}
22
22
<pre><code class="wrap {{if $highlightClass}}language-{{$highlightClass}}{{else}}nohighlight{{end}}">{{$section.GetComputedInlineDiffFor $line}}</code></pre>
31
31
{{ template "repo/diff/comments" dict "root" $.root "comments" $line.Comments}}
32
32
</ui>
33
33
</div>
34
- {{template "repo/diff/comment_form_datahandler" dict "root" $.root "comment" (index $line.Comments 0)}}
34
+ {{if $.IsSigned}}
35
+ {{template "repo/diff/comment_form_datahandler" dict "root" $.root "comment" (index $line.Comments 0)}}
36
+ {{end}}
35
37
</div>
36
38
</td>
37
39
</tr>
You can’t perform that action at this time.
0 commit comments