<%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.HasRepoPermissionLevel('admin')(c.repo_name) or c.pull_request.owner_id == request.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',class_='panel-body')}

${_('Title')}: ${h.urlify_text(c.pull_request.title, c.pull_request.org_repo.repo_name)} %if c.pull_request.is_closed(): (${_('Closed')}) %endif

${h.urlify_text(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
${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
%if c.cs_ranges:
## 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(clone_uri_tmpl=c.clone_uri_tmpl)} -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(clone_uri_tmpl=c.clone_uri_tmpl)} ${c.pull_request.org_ref_parts[1]} %endif
%endif
${h.fmt_date(c.pull_request.created_on)}
${h.gravatar_div(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_cs:
%for cnt, cs in enumerate(c.avail_cs): %if c.cs_ranges and cs.revision == c.cs_ranges[-1].revision: %if editable: %endif %else: %if editable: %endif %endif %endfor
${h.radio(name='updaterev', value='', checked=True)} ${_("Current revision - no change")} ${h.radio(name='updaterev', value=cs.raw_id, style=None if cs.revision in c.avail_revs else 'visibility: hidden')} ${cs.date} ${h.link_to(h.show_id(cs),h.url('changeset_home',repo_name=c.cs_repo.repo_name,revision=cs.raw_id), class_='changeset_hash')}
%for tag in cs.tags: ${h.link_to(tag,h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))} %endfor
${h.urlify_text(cs.message.splitlines()[0], c.repo_name)}
${_("Pull request iterations do not change content once created. Select a revision to create a new iteration.")}
%endif %if c.update_msg_other:
${c.update_msg_other}
%endif
%if editable:
${h.submit('pr-form-save',_('Save Changes'),class_="btn btn-default btn-sm")} ${h.submit('pr-form-clone',_('Create New Iteration with Changes'),class_="btn btn-default btn-sm",disabled='disabled')} ${h.reset('pr-form-reset',_('Cancel Changes'),class_="btn btn-default btn-sm")}
%endif
## REVIEWERS

${_('Reviewers')}

## members goes here !
%for member,status in c.pull_request_reviewers: %endfor
    %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.owner_id == member.user_id: (${_('Owner')}) %endif %if editable: %endif
  • %endfor
%if editable:
${h.text('user', class_='form-control',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
${h.end_form()}
${_('Pull Request Content')}
${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), class_="changeset_hash")}
## FILES
% if c.limited_diff: ${ungettext('%s file changed', '%s files changed', len(c.file_diff_data)) % len(c.file_diff_data)}: % else: ${ungettext('%s file changed with %s insertions and %s deletions','%s files changed with %s insertions and %s deletions', len(c.file_diff_data)) % (len(c.file_diff_data),c.lines_added,c.lines_deleted)}: %endif
%if not c.file_diff_data: ${_('No files')} %endif %for fid, url_fid, op, a_path, path, diff, stats in c.file_diff_data:
${h.link_to(path, '#%s' % fid)}
${h.fancy_file_stats(stats)}
%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()} ${diff_block.diff_block(c.a_repo.repo_name, c.a_ref_type, c.a_ref_name, c.a_rev, c.cs_repo.repo_name, c.cs_ref_type, c.cs_ref_name, c.cs_rev, c.file_diff_data)} % 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(change_status=c.allowed_to_change_status)}