changeset 5645:9f754ef1c18f

diff: make diff_block_simple (and thus pull request diffs) collapsable as changeset diffs are I am not sure this is useful when the whole diff is sent to the client side anyway ... but for now, let's be consistent.
author Mads Kiilerich <madski@unity3d.com>
date Tue, 05 Jan 2016 16:55:52 +0100
parents e8229d389948
children a02ce1c9a6f0
files kallithea/templates/changeset/diff_block.html
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/templates/changeset/diff_block.html	Tue Jan 05 16:55:52 2016 +0100
+++ b/kallithea/templates/changeset/diff_block.html	Tue Jan 05 16:55:52 2016 +0100
@@ -66,6 +66,10 @@
 </%def>
 
 <%def name="diff_block_simple(files, changes)">
+<div class="diff-collapse">
+    <span target="${'diff-container-%s' % (id(changes))}" class="diff-collapse-button">&uarr; ${_('Collapse Diff')} &uarr;</span>
+</div>
+<div class="diff-container" id="${'diff-container-%s' % (id(changes))}">
   %for fid, ch, f, stat in files:
     <%
     op, filenode_path, diff = changes[fid]
@@ -126,6 +130,7 @@
         </div>
     </div>
   %endfor
+</div>
 </%def>
 
 <%def name="diff_block_js()">