diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl
index a602a671a0..1ea51ffdb5 100644
--- a/templates/repo/diff/box.tmpl
+++ b/templates/repo/diff/box.tmpl
@@ -8,7 +8,9 @@
@@ -104,7 +106,7 @@
- {{if not (len $line.Comments)}}
+ {{if and $.IsSigned (not (len $line.Comments))}}
{{end}}
{{if $line.LeftIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}
@@ -114,7 +116,7 @@
|
- {{if not (len $line.Comments)}}
+ {{if and $.IsSigned (not (len $line.Comments))}}
{{end}}
{{if $line.RightIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}
@@ -129,7 +131,12 @@
{{ template "repo/diff/comments" dict "root" $ "comments" $line.Comments}}
- {{template "repo/diff/comment_form_datahandler" dict "root" $ "comment" (index $line.Comments 0)}}
+ {{if $.IsSigned}}
+ {{template "repo/diff/comment_form_datahandler" dict "root" $ "comment" (index $line.Comments 0)}}
+ {{end}}
+ {{printf "%v" $}}
+
+ {{printf "%v" $.IsSigned}}
|
diff --git a/templates/repo/diff/section_unified.tmpl b/templates/repo/diff/section_unified.tmpl
index 8db154bd57..23cb296705 100644
--- a/templates/repo/diff/section_unified.tmpl
+++ b/templates/repo/diff/section_unified.tmpl
@@ -16,7 +16,7 @@
{{end}}
- {{if not (len $line.Comments)}}
+ {{if and $.IsSigned (not (len $line.Comments))}}
{{end}}
{{$section.GetComputedInlineDiffFor $line}}
@@ -31,7 +31,9 @@
{{ template "repo/diff/comments" dict "root" $.root "comments" $line.Comments}}
- {{template "repo/diff/comment_form_datahandler" dict "root" $.root "comment" (index $line.Comments 0)}}
+ {{if $.IsSigned}}
+ {{template "repo/diff/comment_form_datahandler" dict "root" $.root "comment" (index $line.Comments 0)}}
+ {{end}}
|