## -*- coding: utf-8 -*- <%inherit file="/base/base.html"/> <%def name="title()"> %if c.compare_home: ${_('%s Compare') % c.repo_name} %else: ${_('%s Compare') % c.repo_name} - ${'%s@%s' % (c.source_repo.repo_name, c.source_ref)} > ${'%s@%s' % (c.target_repo.repo_name, c.target_ref)} %endif %if c.rhodecode_name: · ${h.branding(c.rhodecode_name)} %endif <%def name="breadcrumbs_links()"> ${ungettext('%s commit','%s commits', len(c.commit_ranges)) % len(c.commit_ranges)} <%def name="menu_bar_nav()"> ${self.menu_items(active='repositories')} <%def name="menu_bar_subnav()"> ${self.repo_menu(active='compare')} <%def name="main()">
${self.repo_page_title(c.rhodecode_db_repo)}
## The hidden elements are replaced with a select2 widget
${_('Target')}
${h.hidden('compare_source')}
${_('Source')}
${h.hidden('compare_target')} %if not c.preview_mode:
%if not c.compare_home: ${_('Swap')} %endif
${_('Compare Commits')}
%if c.files:
${_('Comment')}
%endif
%endif
## use JS script to load it quickly before potentially large diffs render long time ## this prevents from situation when large diffs block rendering of select2 fields ## changeset status form <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> ## main comment form and it status <% def revs(_revs): form_inputs = [] for cs in _revs: tmpl = '' % {'cid': cs.raw_id} form_inputs.append(tmpl) return form_inputs %> %if c.compare_home:
${_('Compare commits, branches, bookmarks or tags.')}
%else:
##CS <%include file="compare_commits.html"/> ## FILES
${_('Expand All')} | ${_('Collapse All')}

${diff_block.diff_summary_text(len(c.files), c.lines_added, c.lines_deleted, c.limited_diff)}

%if not c.files:

${_('No files')}

%endif <%namespace name="diff_block" file="/changeset/diff_block.html"/> %for FID, change, path, stats, file in c.files: %endfor
${h.fancy_file_stats(stats)}
${diff_block.diff_block_simple([c.changes[FID]])}
% if c.limited_diff: ${diff_block.changeset_message()} % endif
%endif