diff options
author | silverwind <me@silverwind.io> | 2017-12-14 19:26:59 +0100 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2017-12-14 20:26:59 +0200 |
commit | 1687aa59e636210eb044a3ad345f30d7af6ae396 (patch) | |
tree | 71cdc109cccb5b59491305ed73dad6b54ad1fca0 /templates | |
parent | f94c1b3943ebc4249e6240855c5414f735e8b25f (diff) | |
download | gitea-1687aa59e636210eb044a3ad345f30d7af6ae396.tar.gz gitea-1687aa59e636210eb044a3ad345f30d7af6ae396.zip |
Improve suppressed diff boxes (#3193)
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/diff/box.tmpl | 23 |
1 files changed, 15 insertions, 8 deletions
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}} <span class="add" data-line="{{.Addition}}">{{.Addition}}</span> <span class="bar"> - <span class="pull-left add"></span> - <span class="pull-left del"></span> + <div class="pull-left add"></div> + <div class="pull-left del"></div> </span> <span class="del" data-line="{{.Deletion}}">{{.Deletion}}</span> {{else}} @@ -36,19 +36,26 @@ {{range $i, $file := .Diff.Files}} {{if $file.IsIncomplete}} <div class="diff-file-box diff-box file-content"> - <h4 class="ui top attached normal header"> - {{$.i18n.Tr "repo.diff.file_suppressed"}} + <h4 class="ui top attached normal header rounded"> <div class="diff-counter count ui left"> {{if not $file.IsRenamed}} <span class="add" data-line="{{.Addition}}">+ {{.Addition}}</span> <span class="bar"> - <span class="pull-left add"></span> - <span class="pull-left del"></span> + <div class="pull-left add"></div> + <div class="pull-left del"></div> </span> <span class="del" data-line="{{.Deletion}}">- {{.Deletion}}</span> {{end}} </div> <span class="file">{{$file.Name}}</span> + <div>{{$.i18n.Tr "repo.diff.file_suppressed"}}</div> + {{if not $file.IsSubmodule}} + {{if $file.IsDeleted}} + <a class="ui basic grey tiny button" rel="nofollow" href="{{EscapePound $.BeforeSourcePath}}/{{EscapePound .Name}}">{{$.i18n.Tr "repo.diff.view_file"}}</a> + {{else}} + <a class="ui basic grey tiny button" rel="nofollow" href="{{EscapePound $.SourcePath}}/{{EscapePound .Name}}">{{$.i18n.Tr "repo.diff.view_file"}}</a> + {{end}} + {{end}} </h4> </div> {{else}} @@ -60,8 +67,8 @@ {{else if not $file.IsRenamed}} <span class="add" data-line="{{.Addition}}">+ {{.Addition}}</span> <span class="bar"> - <span class="pull-left add"></span> - <span class="pull-left del"></span> + <div class="pull-left add"></div> + <div class="pull-left del"></div> </span> <span class="del" data-line="{{.Deletion}}">- {{.Deletion}}</span> {{end}} |