# HG changeset patch
# User Jan Heylen <[email protected]>
# Date 1448811822 -3600
#      Sun Nov 29 16:43:42 2015 +0100
# Node ID 3bd79591517080ccf795e559650db057112b7219
# Parent  f306d394f56a447d11521596df6ed730fbca9709
diff: diff_block_simple: make it collapsable and default behaviour selectable

diff -r f306d394f56a -r 3bd795915170 
kallithea/templates/changeset/diff_block.html
--- a/kallithea/templates/changeset/diff_block.html     Thu Dec 24 21:28:19 
2015 +0100
+++ b/kallithea/templates/changeset/diff_block.html     Sun Nov 29 16:43:42 
2015 +0100
@@ -65,8 +65,21 @@
 </div>
 </%def>
 
-<%def name="diff_block_simple(change)">
-
+<%def name="diff_block_simple(change, hidden=False)">
+<%
+if hidden:
+    container_class = "hidden"
+else:
+    container_class = ""
+%>
+<div class="diff-collapse">
+    %if hidden:
+    <span target="${'diff-container-%s' % (id(change))}" 
class="diff-collapse-button">&darr; ${_('Expand Diff')} &darr;</span>
+    %else:
+    <span target="${'diff-container-%s' % (id(change))}" 
class="diff-collapse-button">&uarr; ${_('Collapse Diff')} &uarr;</span>
+    %endif
+</div>
+<div class="diff-container ${container_class}" id="${'diff-container-%s' % 
(id(change))}">
   %for op,filenode_path,diff in change:
     <div id="${h.FID('',filenode_path)}_target" 
style="clear:both;margin-top:25px"></div>
     <div id="${h.FID('',filenode_path)}" class="diffblock  margined comm">
@@ -124,6 +137,7 @@
         </div>
     </div>
   %endfor
+</div>
 </%def>
 
 <%def name="diff_block_js()">
_______________________________________________
kallithea-general mailing list
[email protected]
http://lists.sfconservancy.org/mailman/listinfo/kallithea-general

Reply via email to