diff --git a/kallithea/templates/changeset/diff_block.html b/kallithea/templates/changeset/diff_block.html --- a/kallithea/templates/changeset/diff_block.html +++ b/kallithea/templates/changeset/diff_block.html @@ -65,9 +65,11 @@ -<%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] + %>
diff --git a/kallithea/templates/compare/compare_diff.html b/kallithea/templates/compare/compare_diff.html --- a/kallithea/templates/compare/compare_diff.html +++ b/kallithea/templates/compare/compare_diff.html @@ -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:

${_('Changeset was too big and was cut off...')} ${_('Show full diff')}

% endif diff --git a/kallithea/templates/pullrequests/pullrequest_show.html b/kallithea/templates/pullrequests/pullrequest_show.html --- a/kallithea/templates/pullrequests/pullrequest_show.html +++ b/kallithea/templates/pullrequests/pullrequest_show.html @@ -356,9 +356,7 @@ ${self.repo_context_bar('showpullrequest
<%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:

${_('Changeset was too big and was cut off...')} ${_('Show full diff anyway')}

% endif