From 1687aa59e636210eb044a3ad345f30d7af6ae396 Mon Sep 17 00:00:00 2001 From: silverwind Date: Thu, 14 Dec 2017 19:26:59 +0100 Subject: Improve suppressed diff boxes (#3193) --- templates/repo/diff/box.tmpl | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'templates') diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index 5495b110b7..5de4f67091 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -17,8 +17,8 @@ {{if not .IsBin}} {{.Addition}} - - +
+
{{.Deletion}} {{else}} @@ -36,19 +36,26 @@ {{range $i, $file := .Diff.Files}} {{if $file.IsIncomplete}}
-

- {{$.i18n.Tr "repo.diff.file_suppressed"}} +

{{if not $file.IsRenamed}} + {{.Addition}} - - +
+
- {{.Deletion}} {{end}}
{{$file.Name}} +
{{$.i18n.Tr "repo.diff.file_suppressed"}}
+ {{if not $file.IsSubmodule}} + {{if $file.IsDeleted}} + {{$.i18n.Tr "repo.diff.view_file"}} + {{else}} + {{$.i18n.Tr "repo.diff.view_file"}} + {{end}} + {{end}}

{{else}} @@ -60,8 +67,8 @@ {{else if not $file.IsRenamed}} + {{.Addition}} - - +
+
- {{.Deletion}} {{end}} -- cgit v1.2.3