## -*- coding: utf-8 -*- <%inherit file="/base/base.html"/> <%namespace name="cbdiffs" file="/codeblocks/diffs.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.diffset and c.diffset.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"/> ${cbdiffs.render_diffset(c.diffset)}
%endif