From 4cb3a60f161488eb6b86791a7c4fdefa02d8cc17 Mon Sep 17 00:00:00 2001 From: Jonas Franz Date: Thu, 24 May 2018 15:54:18 +0200 Subject: [PATCH] Show add button only if no comments already exist for the line Signed-off-by: Jonas Franz --- templates/repo/diff/box.tmpl | 8 ++++++-- templates/repo/diff/section_unified.tmpl | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index 658022d94e..a602a671a0 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -104,7 +104,9 @@ - + + {{if not (len $line.Comments)}} + + + {{end}}
{{if $line.LeftIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}
@@ -112,7 +114,9 @@ - + + {{if not (len $line.Comments)}} + + + {{end}}
{{if $line.RightIdx}}{{$section.GetComputedInlineDiffFor $line}}{{end}}
diff --git a/templates/repo/diff/section_unified.tmpl b/templates/repo/diff/section_unified.tmpl index b710532975..8db154bd57 100644 --- a/templates/repo/diff/section_unified.tmpl +++ b/templates/repo/diff/section_unified.tmpl @@ -16,7 +16,9 @@ {{end}} - + + {{if not (len $line.Comments)}} + + + {{end}}
{{$section.GetComputedInlineDiffFor $line}}