diff options
author | Siarhei Navatski <navatski@gmail.com> | 2016-07-22 21:18:56 +0300 |
---|---|---|
committer | 无闻 <u@gogs.io> | 2016-07-23 02:18:56 +0800 |
commit | cf85e9eb7b125156fc3289f6a1306e16b748929b (patch) | |
tree | 3afbdcf3038054ee1af1dde79bba5aaa8e28e591 /templates | |
parent | 599716bb1b78e6be903db92fde6d9bf65d79bf3e (diff) | |
download | gitea-cf85e9eb7b125156fc3289f6a1306e16b748929b.tar.gz gitea-cf85e9eb7b125156fc3289f6a1306e16b748929b.zip |
add IsSubmodule field to DiffFile and hide view file button on diff page for submodules (#3097)
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/diff_box.tmpl | 16 |
1 files changed, 9 insertions, 7 deletions
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}} </div> <span class="file">{{if $file.IsRenamed}}{{$file.OldName}} → {{end}}{{$file.Name}}</span> - <div class="ui right"> - {{if $file.IsDeleted}} - <a class="ui basic tiny button" rel="nofollow" href="{{EscapePound $.BeforeSourcePath}}/{{EscapePound .Name}}">{{$.i18n.Tr "repo.diff.view_file"}}</a> - {{else}} - <a class="ui basic tiny button" rel="nofollow" href="{{EscapePound $.SourcePath}}/{{EscapePound .Name}}">{{$.i18n.Tr "repo.diff.view_file"}}</a> - {{end}} - </div> + {{if not $file.IsSubmodule}} + <div class="ui right"> + {{if $file.IsDeleted}} + <a class="ui basic tiny button" rel="nofollow" href="{{EscapePound $.BeforeSourcePath}}/{{EscapePound .Name}}">{{$.i18n.Tr "repo.diff.view_file"}}</a> + {{else}} + <a class="ui basic tiny button" rel="nofollow" href="{{EscapePound $.SourcePath}}/{{EscapePound .Name}}">{{$.i18n.Tr "repo.diff.view_file"}}</a> + {{end}} + </div> + {{end}} </h4> <div class="ui attached table segment"> {{if not $file.IsRenamed}} |