## -*- coding: utf-8 -*- <%inherit file="/base/base.mako"/> <%namespace name="cbdiffs" file="/codeblocks/diffs.mako"/> <%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)}

${_('Compare Commits')} % if c.file_path: ${_('for file')} ${c.file_path} % endif % if c.commit_ranges: r${c.source_commit.revision}:${h.short_id(c.source_commit.raw_id)}...r${c.target_commit.revision}:${h.short_id(c.target_commit.raw_id)} % endif

${_('Target')}:
## The hidden elements are replaced with a select2 widget ${h.hidden('compare_source')}
${_('Source')}:
## The hidden elements are replaced with a select2 widget ${h.hidden('compare_target')}
${_('Actions')}:
% if c.compare_home: ${_('Compare Commits')} ${_('Swap')} ${_('Comment')}
${_('Compare commits, branches, bookmarks or tags.')}
% elif c.preview_mode: ${_('Compare Commits')} ${_('Swap')} ${_('Comment')} % else: ${_('Compare Commits')} ${_('Swap')} ## allow comment only if there are commits to comment on % if c.diffset and c.diffset.files and c.commit_ranges: ${_('Comment')} % else: ${_('Comment')} % endif % endif
<%doc> ##TODO(marcink): implement this and diff menus ## commit status form
## 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 ## table diff data
% if not c.compare_home:
## commit compare generated below <%include file="compare_commits.mako"/> ${cbdiffs.render_diffset_menu()} ${cbdiffs.render_diffset(c.diffset)}
% endif