From cf85e9eb7b125156fc3289f6a1306e16b748929b Mon Sep 17 00:00:00 2001 From: Siarhei Navatski Date: Fri, 22 Jul 2016 21:18:56 +0300 Subject: add IsSubmodule field to DiffFile and hide view file button on diff page for submodules (#3097) --- templates/repo/diff_box.tmpl | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'templates') diff --git a/templates/repo/diff_box.tmpl b/templates/repo/diff_box.tmpl index a0565e6c8d..76a414d23e 100644 --- a/templates/repo/diff_box.tmpl +++ b/templates/repo/diff_box.tmpl @@ -68,13 +68,15 @@ {{end}} {{if $file.IsRenamed}}{{$file.OldName}} → {{end}}{{$file.Name}} -
- {{if $file.IsDeleted}} - {{$.i18n.Tr "repo.diff.view_file"}} - {{else}} - {{$.i18n.Tr "repo.diff.view_file"}} - {{end}} -
+ {{if not $file.IsSubmodule}} +
+ {{if $file.IsDeleted}} + {{$.i18n.Tr "repo.diff.view_file"}} + {{else}} + {{$.i18n.Tr "repo.diff.view_file"}} + {{end}} +
+ {{end}}
{{if not $file.IsRenamed}} -- cgit v1.2.3