<%inherit file="/base/base.html"/> <%def name="title()"> ${_('%s Pull Request #%s') % (c.repo_name, c.pull_request.pull_request_id)} %if c.rhodecode_name: · ${h.branding(c.rhodecode_name)} %endif <%def name="breadcrumbs_links()"> ${c.pull_request.title} %if c.pull_request.is_closed(): (${_('Closed')}) %endif <%def name="menu_bar_nav()"> ${self.menu_items(active='repositories')} <%def name="menu_bar_subnav()"> ${self.repo_menu(active='showpullrequest')} <%def name="main()">
${self.repo_page_title(c.rhodecode_db_repo)}
${self.breadcrumbs()}
<%summary = lambda n:{False:'summary-short'}.get(n)%>
${_('Pull request #%s') % c.pull_request.pull_request_id} ${_('From')} ${h.format_date(c.pull_request.created_on)} %if c.allowed_to_update:
% if c.allowed_to_delete: ${h.secure_form(url('pullrequest_delete', repo_name=c.pull_request.target_repo.repo_name, pull_request_id=c.pull_request.pull_request_id),method='delete')} ${h.submit('remove_%s' % c.pull_request.pull_request_id, _('Delete'), class_="btn btn-link btn-danger",onclick="return confirm('"+_('Confirm to delete this pull request')+"');")} ${h.end_form()} % else: ${_('Delete')} % endif
${_('Edit')}
%endif
## branch link is only valid if it is a branch %if c.pull_request.source_ref_parts.type == 'branch': ${c.pull_request.source_ref_parts.type}: ${c.pull_request.source_ref_parts.name} %else: ${c.pull_request.source_ref_parts.type}: ${c.pull_request.source_ref_parts.name} %endif ${c.pull_request.source_repo.clone_url()}
%if h.is_hg(c.pull_request.source_repo): %elif h.is_git(c.pull_request.source_repo): %endif
## branch link is only valid if it is a branch %if c.pull_request.target_ref_parts.type == 'branch': ${c.pull_request.target_ref_parts.type}: ${c.pull_request.target_ref_parts.name} %else: ${c.pull_request.target_ref_parts.type}: ${c.pull_request.target_ref_parts.name} %endif ${c.pull_request.target_repo.clone_url()}
## Link to the shadow repository.
% if not c.pull_request.is_closed() and c.pull_request.shadow_merge_ref:
%if h.is_hg(c.pull_request.target_repo): %elif h.is_git(c.pull_request.target_repo): %endif
% else:
${_('Shadow repository data not available')}.
% endif
%if c.pull_request_review_status:
%if c.pull_request.is_closed(): ${_('Closed')}, %endif ${h.commit_status_lbl(c.pull_request_review_status)} - ${ungettext('calculated based on %s reviewer vote', 'calculated based on %s reviewers votes', len(c.pull_request_reviewers)) % len(c.pull_request_reviewers)} %endif
${h.urlify_commit_message(c.pull_request.description, c.repo_name)}
% if c.show_version_changes: ## CURRENTLY SELECT PR VERSION ## SHOW ALL VERSIONS OF PR <% ver_pr = None %> % for ver in reversed(c.pull_request.versions()): <% ver_pr = ver.pull_request_version_id %> % endfor ## show comment/inline comments summary <% inline_comm_count_ver = len(c.inline_versions[ver_pr])%>
% if c.at_version in [None, 'latest']: % else: ${len(c.inline_versions[None])} % endif % if c.versions: ${_('latest')} % else: ${_('initial')} % endif ${c.pull_request_latest.source_ref_parts.commit_id[:6]} ${_('created')} ${h.age_component(c.pull_request_latest.updated_on)} % if c.versions and c.at_version_num in [None, 'latest']: ${_('Show all versions')} % endif
% if c.at_version == ver_pr: % else: ${len(c.inline_versions[ver_pr])} % endif version ${ver_pr} ${ver.source_ref_parts.commit_id[:6]} ${_('created')} ${h.age_component(ver.updated_on)} % if c.at_version == ver_pr: ${_('Show all versions')} % endif
${_('Comments for this version')}: %if c.comments: ${_("%d General ") % len(c.comments)} %else: ${_("%d General ") % len(c.comments)} %endif <% inline_comm_count_ver = len(c.inline_versions[c.at_version_num])%> %if inline_comm_count_ver: , ${_("%d Inline") % inline_comm_count_ver} %else: , ${_("%d Inline") % inline_comm_count_ver} %endif %if c.outdated_cnt: , ${_("%d Outdated") % c.outdated_cnt} | ${_('show outdated comments')} %else: , ${_("%d Outdated") % c.outdated_cnt} %endif
% if c.at_version:
Changed commits:
 * added: ${len(c.changes.added)}
 * removed: ${len(c.changes.removed)}

% if not (c.file_changes.added+c.file_changes.modified+c.file_changes.removed):
No file changes found
% else:
Changed files:
 %for file_name in c.file_changes.added:
 * A ${file_name}
 %endfor
 %for file_name in c.file_changes.modified:
 * M ${file_name}
 %endfor
 %for file_name in c.file_changes.removed:
 * R ${file_name}
 %endfor
% endif
% endif
% else: ${_('Pull request versions not available')}. % endif
## AUTHOR
${_('Author')}
  • ${self.gravatar_with_user(c.pull_request.author.email, 16)}
## REVIEWERS
${_('Pull request reviewers')} %if c.allowed_to_update: ${_('Edit')} %endif
## members goes here !
    %for member,reasons,status in c.pull_request_reviewers:
  • ${self.gravatar_with_user(member.email, 16)}
    %for reason in reasons:
    - ${reason}
    %endfor %if c.allowed_to_update: %endif
  • %endfor
%if not c.pull_request.is_closed(): %endif
##DIFF
##CS % if c.missing_requirements:
${_('Missing requirements:')} ${_('These commits cannot be displayed, because this repository uses the Mercurial largefiles extension, which was not enabled.')}
% elif c.missing_commits:
${_('Missing commits')}: ${_('This pull request cannot be displayed, because one or more commits no longer exist in the source repository.')} ${_('Please update this pull request, push the commits back into the source repository, or consider closing this pull request.')}
% endif % if not c.missing_commits: <%include file="/compare/compare_commits.html" />
<%namespace name="cbdiffs" file="/codeblocks/diffs.html"/> ${cbdiffs.render_diffset_menu()} ${cbdiffs.render_diffset( c.diffset, use_comments=True, collapse_when_files_over=30, disable_new_comments=not c.allowed_to_comment, deleted_files_comments=c.deleted_files_comments)}
% endif
## template for inline comment form <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> ## render general comments ${comment.generate_comments(include_pull_request=True, is_pull_request=True)} % if not c.pull_request.is_closed(): ## main comment form and it status ${comment.comments(h.url('pullrequest_comment', repo_name=c.repo_name, pull_request_id=c.pull_request.pull_request_id), c.pull_request_review_status, is_pull_request=True, change_status=c.allowed_to_change_status)} %endif