## -*- coding: utf-8 -*- ##usage: ## <%namespace name="diff_block" file="/changeset/diff_block.html"/> ## ${diff_block.diff_block_changeset_table(change)} ## <%def name="changeset_message()">
${_('The requested commit is too big and content was truncated.')} ${_('Show full diff')}
<%def name="file_message()">
${_('The requested file is too big and its content is not shown.')} ${_('Show full diff')}
<%def name="diff_block_changeset_table(change)">
%for FID,(cs1, cs2, change, filenode_path, diff, stats, file) in change.iteritems():
${diff|n} % if file["is_limited_diff"]: % if file["exceeds_limit"]: ${self.file_message()} % else:
${_('Diff was truncated. File content available only in full diff.')} ${_('Show full diff')}
% endif % endif
%endfor
<%def name="diff_block_simple(change)">
%for op,filenode_path,diff,file in change:
${diff|n} % if file["is_limited_diff"]: % if file["exceeds_limit"]: ${self.file_message()} % else:
${_('Diff was truncated. File content available only in full diff.')} ${_('Show full diff')}
% endif % endif
%endfor
<%def name="diff_menu(repo_name, f_path, cs1, cs2, change, file=None)"> <% onclick_diff2way = '' if (file and file["exceeds_limit"]): onclick_diff2way = '''return confirm('%s');''' % _("Showing a big diff might take some time and resources, continue?") %> % if change in ['A', 'M']: ${_('Show File')} % else: ${_('Show File')} % endif | ${_('Unified Diff')} | ${_('Side-by-side Diff')} | ${_('Raw Diff')} | ${_('Download Diff')} <%def name="diff_summary_text(changed_files, lines_added, lines_deleted, limited_diff=False)"> % if limited_diff: ${ungettext('%(num)s file changed', '%(num)s files changed', changed_files) % {'num': changed_files}} % else: ${ungettext('%(num)s file changed: %(linesadd)s inserted, ''%(linesdel)s deleted', '%(num)s files changed: %(linesadd)s inserted, %(linesdel)s deleted', changed_files) % {'num': changed_files, 'linesadd': lines_added, 'linesdel': lines_deleted}} %endif