diff options
author | Mario Lubenka <mario.lubenka@googlemail.com> | 2019-10-04 21:58:54 +0200 |
---|---|---|
committer | techknowlogick <techknowlogick@gitea.io> | 2019-10-04 15:58:54 -0400 |
commit | f92a0b68fed81128fa278e82aa0e3d49d74ffdf6 (patch) | |
tree | 41a6a7cd2a8a6153046851b5ab3a9c5aacb0cdfd /templates/repo/diff/box.tmpl | |
parent | de8a0a3938e811ffaa6800a771d7f09fd6428608 (diff) | |
download | gitea-f92a0b68fed81128fa278e82aa0e3d49d74ffdf6.tar.gz gitea-f92a0b68fed81128fa278e82aa0e3d49d74ffdf6.zip |
Bugfix for image compare and minor improvements to image compare (#8289)
* Resolve error when comparing images
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Check blob existence instead of git-ls when checking if file exists
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Show file metadata also when a file was newly added
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Fixes error in commit view
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Excludes assigning path and image infos for compare routers to service package
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Removes nil default and fixes import order
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Adds missing comments
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Moves methods for assigning compare data to context into repo router package
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
* Show image compare for deleted images as well. Simplify check if image should be displayed
Signed-off-by: Mario Lubenka <mario.lubenka@googlemail.com>
Diffstat (limited to 'templates/repo/diff/box.tmpl')
-rw-r--r-- | templates/repo/diff/box.tmpl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index edc04f9068..b5fde36a6f 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -106,7 +106,12 @@ </h4> <div class="ui attached unstackable table segment"> {{if ne $file.Type 4}} - {{$isImage := (call $.IsImageFile $file.Name)}} + {{$isImage := false}} + {{if $file.IsDeleted}} + {{$isImage = (call $.IsImageFileInBase $file.Name)}} + {{else}} + {{$isImage = (call $.IsImageFileInHead $file.Name)}} + {{end}} <div class="file-body file-code code-view code-diff {{if $.IsSplitStyle}}code-diff-split{{else}}code-diff-unified{{end}}"> <table> <tbody> |