From 4c91d64a122a8b0ad47a05487439402eb55591cd Mon Sep 17 00:00:00 2001 From: silverwind Date: Tue, 24 Oct 2023 19:23:29 +0200 Subject: [PATCH] Only show diff file tree when more than one file changed --- templates/repo/diff/box.tmpl | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index 289ed90d3fd3f..c037c3b365238 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -1,7 +1,8 @@ +{{$showFileTree := (and (not .DiffNotAvailable) (gt .Diff.NumFiles 1))}}
- {{if not .DiffNotAvailable}} + {{if $showFileTree}}