[PATCH 5 of 7 v3] diff: fix images showing in case of deleted files
Jan Heylen
heyleke at gmail.com
Sat Jan 2 12:15:05 UTC 2016
# HG changeset patch
# User Jan Heylen <heyleke at gmail.com>
# Date 1451728686 -3600
# Sat Jan 02 10:58:06 2016 +0100
# Node ID 36c5b558da1f46926effdc6c8d97b62879a55dd1
# Parent 6b772872896fdad1ac6e77f9e6c2a033758c8e29
diff: fix images showing in case of deleted files
in preperation of refactoring diff handling, this change fixes
the handling of picture showing when a file gets deleted.
diff -r 6b772872896f -r 36c5b558da1f kallithea/templates/changeset/diff_block.html
--- a/kallithea/templates/changeset/diff_block.html Thu Dec 03 08:59:26 2015 +0100
+++ b/kallithea/templates/changeset/diff_block.html Sat Jan 02 10:58:06 2016 +0100
@@ -49,7 +49,7 @@
<div id="${FID}_image-diff" class="btn btn-image-diff-swap" style="display:none">Press to swap images</div>
%endif
<div style="font-size: 0">
- %if change == 'M':
+ %if change in 'DM':
<img id="${FID}_image-diff-img-a" class="img-diff img-diff-swapable" style="display:none"
realsrc="${h.url('files_raw_home',repo_name=c.repo_name,revision=cs1,f_path=path)}" />
%endif
@@ -128,7 +128,7 @@
<div id="${h.FID('',filenode_path)}_image-diff" class="btn btn-image-diff-swap" style="display:none">Press to swap images</div>
%endif
<div style="font-size: 0">
- %if op == 'M':
+ %if op in 'DM':
<img id="${h.FID('',filenode_path)}_image-diff-img-a" class="img-diff img-diff-swapable" style="display:none"
realsrc="${h.url('files_raw_home',repo_name=c.a_repo.repo_name,revision=c.a_rev,f_path=filenode_path) if op in 'DM' else ''}" />
%endif
More information about the kallithea-general
mailing list