Changeset - 150431aae9ba
[Not reviewed]
default
0 3 0
Jan Heylen - 10 years ago 2016-01-02 11:55:36
heyleke@gmail.com
diff: move looping over files into diff_block_simple

Make it slightly more like regular diff_block and make the next changes
possible.
3 files changed with 7 insertions and 9 deletions:
0 comments (0 inline, 0 general)
kallithea/templates/changeset/diff_block.html
Show inline comments
 
@@ -65,9 +65,11 @@
 
</div>
 
</%def>
 

	
 
<%def name="diff_block_simple(change)">
 

	
 
  %for op,filenode_path,diff in change:
 
<%def name="diff_block_simple(files, changes)">
 
  %for fid, ch, f, stat in files:
 
    <%
 
    op, filenode_path, diff = changes[fid]
 
    %>
 
    <div id="${h.FID('',filenode_path)}_target" style="clear:both;margin-top:25px"></div>
 
    <div id="${h.FID('',filenode_path)}" class="diffblock  margined comm">
 
      <div class="code-header">
kallithea/templates/compare/compare_diff.html
Show inline comments
 
@@ -88,9 +88,7 @@ ${self.repo_context_bar('changelog')}
 
        ## diff block
 
        <%namespace name="diff_block" file="/changeset/diff_block.html"/>
 
        ${diff_block.diff_block_js()}
 
        %for fid, change, f, stat in c.files:
 
          ${diff_block.diff_block_simple([c.changes[fid]])}
 
        %endfor
 
        ${diff_block.diff_block_simple(c.files, c.changes)}
 
        % if c.limited_diff:
 
          <h4>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}">${_('Show full diff')}</a></h4>
 
        % endif
kallithea/templates/pullrequests/pullrequest_show.html
Show inline comments
 
@@ -356,9 +356,7 @@ ${self.repo_context_bar('showpullrequest
 
    <div class="commentable-diff">
 
    <%namespace name="diff_block" file="/changeset/diff_block.html"/>
 
    ${diff_block.diff_block_js()}
 
    %for fid, change, f, stat in c.files:
 
      ${diff_block.diff_block_simple([c.changes[fid]])}
 
    %endfor
 
    ${diff_block.diff_block_simple(c.files, c.changes)}
 
    % if c.limited_diff:
 
      <h4>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}">${_('Show full diff anyway')}</a></h4>
 
    % endif
0 comments (0 inline, 0 general)