<%inherit file="/base/base.html"/> <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> <%block name="title"> ${_('%s Pull Request %s') % (c.repo_name, c.pull_request.nice_id())} <%def name="breadcrumbs_links()"> ${_('Pull request %s from %s#%s') % (c.pull_request.nice_id(), c.pull_request.org_repo.repo_name, c.cs_branch_name)} <%block name="header_menu"> ${self.menu('repositories')} <%def name="main()"> <% editable = not c.pull_request.is_closed() and (h.HasPermissionAny('hg.admin')() or h.HasRepoPermissionAny('repository.admin')(c.repo_name) or c.pull_request.owner.user_id == c.authuser.user_id) %> ${self.repo_context_bar('showpullrequest')}
${self.breadcrumbs()}
${h.form(url('pullrequest_post', repo_name=c.repo_name, pull_request_id=c.pull_request.pull_request_id), method='post', id='pull_request_form')}
${_('Title')}: ${c.pull_request.title} %if c.pull_request.is_closed(): (${_('Closed')}) %endif
%if editable: %endif
${h.urlify_commit(c.pull_request.description, c.pull_request.org_repo.repo_name)}
%if editable: %endif
%if c.current_voting_result: %if c.pull_request.is_closed(): ${_('Closed')}, %endif ${h.changeset_status_lbl(c.current_voting_result)} %endif
% if len(c.pull_request_pending_reviewers) > 0:
${ungettext('%d reviewer', '%d reviewers',len(c.pull_request_pending_reviewers)) % len(c.pull_request_pending_reviewers)}
% elif len(c.pull_request_reviewers) > 0:
${_('Pull request was reviewed by all reviewers')}
%else:
${_('There are no reviewers')}
%endif
${h.link_to_ref(c.pull_request.org_repo.repo_name, c.cs_ref_type, c.cs_ref_name, c.cs_rev)} %if c.cs_ref_type != 'branch': ${_('on')} ${h.link_to_ref(c.pull_request.org_repo.repo_name, 'branch', c.cs_branch_name)} %endif
%if c.is_range: ${_("This is just a range of changesets and doesn't have a target or a real merge ancestor.")} %else: ${h.link_to_ref(c.pull_request.other_repo.repo_name, c.a_ref_type, c.a_ref_name)} ## we don't know other rev - c.a_rev is ancestor and not necessarily on other_name_branch branch %endif
## TODO: use cs_ranges[-1] or org_ref_parts[1] in both cases? %if h.is_hg(c.pull_request.org_repo): hg pull ${c.pull_request.org_repo.clone_url()} -r ${h.short_id(c.cs_ranges[-1].raw_id)} %elif h.is_git(c.pull_request.org_repo): git pull ${c.pull_request.org_repo.clone_url()} ${c.pull_request.org_ref_parts[1]} %endif
${h.fmt_date(c.pull_request.created_on)}
${h.gravatar(c.pull_request.owner.email, size=20)}
${c.pull_request.owner.full_name_and_username}
${c.pull_request.owner.email}
${c.update_msg}
%if c.avail_revs:
%for cnt, cs in enumerate(c.avail_cs): %if cs.revision == c.cs_ranges[-1].revision: %else: %endif %endfor
%if editable: ${h.radio(name='updaterev', value='')} %endif ${_("Current revision - no change")} %if editable and cs.revision in c.avail_revs: ${h.radio(name='updaterev', value=cs.raw_id)} %endif ${h.link_to(h.show_id(cs),h.url('changeset_home',repo_name=c.cs_repo.repo_name,revision=cs.raw_id))}
${h.urlify_commit(cs.message, c.repo_name)}
%endif
${c.update_msg_other}
## REVIEWERS
${_('Pull Request Reviewers')}
## members goes here !
    %for member,status in c.pull_request_reviewers: ## WARNING: the HTML below is duplicate with ## kallithea/public/js/base.js ## If you change something here it should be reflected in the template too.
  • ${h.gravatar(member.email, size=14)}
    ${member.full_name_and_username} %if c.pull_request.user_id == member.user_id: (${_('Owner')}) %endif
    %if editable:
    %endif
  • %endfor
%if editable:
${h.text('user', class_='yui-ac-input',placeholder=_('Type name of reviewer to add'))}
%endif
%if not c.pull_request_reviewers:
${_('Potential Reviewers')}
${_('Click to add the repository owner as reviewer:')}
%endif
%if editable:
${h.submit('pr-form-save',_('Save Changes'),class_="btn btn-small")} ${h.submit('pr-form-clone',_('Save as New Pull Request'),class_="btn btn-small",disabled='disabled')} ${h.reset('pr-form-reset',_('Cancel Changes'),class_="btn btn-small")}
%endif
${h.end_form()}
${comment.comment_count(c.inline_cnt, len(c.comments))}
##CS
${ungettext('Showing %s commit','Showing %s commits', len(c.cs_ranges)) % len(c.cs_ranges)}
<%include file="/compare/compare_cs.html" />
${_('Common ancestor')}: ${h.link_to(h.short_id(c.a_rev),h.url('changeset_home',repo_name=c.a_repo.repo_name,revision=c.a_rev))}
## FILES
% if c.limited_diff: ${ungettext('%s file changed', '%s files changed', len(c.files)) % len(c.files)} % else: ${ungettext('%s file changed with %s insertions and %s deletions','%s files changed with %s insertions and %s deletions', len(c.files)) % (len(c.files),c.lines_added,c.lines_deleted)}: %endif
%if not c.files: ${_('No files')} %endif %for fid, change, f, stat in c.files:
${h.link_to(h.safe_unicode(f),'#' + fid)}
${h.fancy_file_stats(stat)}
%endfor
% if c.limited_diff:
${_('Changeset was too big and was cut off...')} ${_('Show full diff anyway')}
% endif
## diff block
<%namespace name="diff_block" file="/changeset/diff_block.html"/> ${diff_block.diff_block_js()} %for fid, change, f, stat in c.files: ${diff_block.diff_block_simple([c.changes[fid]])} %endfor % if c.limited_diff:

${_('Changeset was too big and was cut off...')} ${_('Show full diff anyway')}

% endif
## template for inline comment form ${comment.comment_inline_form()} ## render comments and inlines ${comment.generate_comments()} ## 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.current_voting_result, is_pr=True, change_status=c.allowed_to_change_status)}