##// END OF EJS Templates
old style: don't let changelog buttons at the top influence changelog/graph floating
old style: don't let changelog buttons at the top influence changelog/graph floating

File last commit:

r4116:ffd45b18 rhodecode-2.2.5-gpl
r4149:30a683d0 rhodecode-2.2.5-gpl
Show More
pullrequest_show.html
259 lines | 11.8 KiB | text/html | HtmlLexer
Added basic models for saving open pull requests...
r2434 <%inherit file="/base/base.html"/>
<%def name="title()">
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 ${_('%s Pull Request #%s') % (c.repo_name, c.pull_request.pull_request_id)}
%if c.rhodecode_name:
&middot; ${c.rhodecode_name}
%endif
Added basic models for saving open pull requests...
r2434 </%def>
<%def name="breadcrumbs_links()">
${_('Pull request #%s') % c.pull_request.pull_request_id}
</%def>
Mads Kiilerich
templates: enforce more consistency by being less flexible in templates...
r3609 <%def name="page_nav()">
${self.menu('repositories')}
</%def>
Added basic models for saving open pull requests...
r2434 <%def name="main()">
Mads Kiilerich
templates: drop context_bar, use repo_context_bar directly
r3988 ${self.repo_context_bar('showpullrequest')}
Added basic models for saving open pull requests...
r2434 <div class="box">
<!-- box / title -->
<div class="title">
${self.breadcrumbs()}
</div>
Mads Kiilerich
pullrequests: state "closed" explicitly...
r3652
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 <div class="form" style="float: left">
<div class="pr-details-title ${'closed' if c.pull_request.is_closed() else ''}">
${_('Title')}: ${c.pull_request.title}
%if c.pull_request.is_closed():
(${_('Closed')})
%endif
</div>
new summary for opened pull requests...
r2712 <div id="summary" class="fields">
<div class="field">
<div class="label-summary">
review members are dynamically changed based on selected other_repo owner...
r3388 <label>${_('Review status')}:</label>
new summary for opened pull requests...
r2712 </div>
<div class="input">
<div class="changeset-status-container" style="float:none;clear:both">
%if c.current_changeset_status:
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 <div class="changeset-status-ico" style="padding:0px 4px 0px 0px">
<img src="${h.url('/images/icons/flag_status_%s.png' % c.current_changeset_status)}" title="${_('Pull request status calculated from votes')}"/></div>
pull requests: remove redundant status icon from pr title....
r4054 <div class="changeset-status-lbl tooltip" title="${_('Pull request status calculated from votes')}">
codecleaner
r3656 %if c.pull_request.is_closed():
${_('Closed')},
%endif
Mads Kiilerich
pullrequests: state "closed" explicitly...
r3652 ${h.changeset_status_lbl(c.current_changeset_status)}
</div>
pull requests: remove redundant status icon from pr title....
r4054
new summary for opened pull requests...
r2712 %endif
</div>
</div>
</div>
<div class="field">
<div class="label-summary">
<label>${_('Still not reviewed by')}:</label>
</div>
<div class="input">
Show that all reviewers reviewed pull request
r2883 % if len(c.pull_request_pending_reviewers) > 0:
Mads Kiilerich
Use space after , in lists
r3987 <div class="tooltip" title="${h.tooltip(', '.join([x.username for x in c.pull_request_pending_reviewers]))}">${ungettext('%d reviewer', '%d reviewers',len(c.pull_request_pending_reviewers)) % len(c.pull_request_pending_reviewers)}</div>
Show that all reviewers reviewed pull request
r2883 %else:
Mads Kiilerich
Fix a lot of casings - use standard casing in most places
r3654 <div>${_('Pull request was reviewed by all reviewers')}</div>
Show that all reviewers reviewed pull request
r2883 %endif
new summary for opened pull requests...
r2712 </div>
White space cleanup
r2815 </div>
implemented #725 Pull Request View - Show origin repo URL
r3170 <div class="field">
<div class="label-summary">
<label>${_('Origin repository')}:</label>
</div>
<div class="input">
<div>
pull requests: link to origin branch
r4057
## branch link is only valid if it is a branch
<span class="spantag"><a href="${h.url('summary_home', repo_name=c.pull_request.org_repo.repo_name, anchor=c.pull_request.org_ref_parts[1])}">${c.pull_request.org_ref_parts[0]}: ${c.pull_request.org_ref_parts[1]}</a></span>
pull requests: show pull url with revision to merge the pull request
r4047 <span>
%if h.is_hg(c.pull_request.org_repo):
| ${_('Pull changes')} <span style="font-family: monospace">hg pull -r ${h.short_id(c.cs_ranges[-1].raw_id)} <a href="${h.url('summary_home', repo_name=c.pull_request.org_repo.repo_name)}">${c.pull_request.org_repo.clone_url()}</a></span>
%elif h.is_git(c.pull_request.org_repo):
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 | ${_('Pull changes')} <span style="font-family: monospace">git pull <a href="${h.url('summary_home', repo_name=c.pull_request.org_repo.repo_name)}">${c.pull_request.org_repo.clone_url()}</a> ${c.pull_request.org_ref_parts[1]} </span>
pull requests: show pull url with revision to merge the pull request
r4047 %endif
implemented #725 Pull Request View - Show origin repo URL
r3170 </div>
</div>
whitespace cleanup
r3216 </div>
Mads Kiilerich
pull request: show summary and creation date in table
r3248 <div class="field">
<div class="label-summary">
Mads Kiilerich
Minor changes
r3717 <label>${_('Description')}:</label>
Mads Kiilerich
pull request: show summary and creation date in table
r3248 </div>
<div class="input">
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 <div style="white-space:pre-wrap">${h.urlify_commit(c.pull_request.description, c.repo_name)}</div>
Mads Kiilerich
pull request: show summary and creation date in table
r3248 </div>
</div>
<div class="field">
<div class="label-summary">
<label>${_('Created on')}:</label>
</div>
<div class="input">
<div>${h.fmt_date(c.pull_request.created_on)}</div>
</div>
</div>
new summary for opened pull requests...
r2712 </div>
White space cleanup
r2815 </div>
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 ## REVIEWERS
<div style="float:left; border-left:1px dashed #eee">
<div class="pr-details-title">${_('Pull request reviewers')}</div>
<div id="reviewers" style="padding:0px 0px 5px 10px">
## members goes here !
<div style="min-height:30px">
<ul id="review_members" class="group_members">
%for member,status in c.pull_request_reviewers:
<li id="reviewer_${member.user_id}">
<div class="reviewers_member">
<div class="reviewer_status tooltip" title="${h.tooltip(h.changeset_status_lbl(status[0][1].status if status else 'not_reviewed'))}">
<img src="${h.url(str('/images/icons/flag_status_%s.png' % (status[0][1].status if status else 'not_reviewed')))}"/>
</div>
<div class="reviewer_gravatar gravatar"><img alt="gravatar" src="${h.gravatar_url(member.email,14)}"/> </div>
<div style="float:left;">${member.full_name} (${_('owner') if c.pull_request.user_id == member.user_id else _('reviewer')})</div>
<input type="hidden" value="${member.user_id}" name="review_members" />
%if not c.pull_request.is_closed() and (h.HasPermissionAny('hg.admin')() or h.HasRepoPermissionAny('repository.admin')(c.repo_name) or c.pull_request.user_id == c.rhodecode_user.user_id):
<div class="reviewer_member_remove action_button" onclick="removeReviewMember(${member.user_id})">
<i class="icon-remove-sign" style="color: #FF4444;"></i>
</div>
%endif
</div>
</li>
%endfor
</ul>
</div>
%if not c.pull_request.is_closed():
<div class='ac'>
%if h.HasPermissionAny('hg.admin')() or h.HasRepoPermissionAny('repository.admin')(c.repo_name) or c.pull_request.author.user_id == c.rhodecode_user.user_id:
<div class="reviewer_ac">
${h.text('user', class_='yui-ac-input')}
<span class="help-block">${_('Add or remove reviewer to this pull request.')}</span>
<div id="reviewers_container"></div>
</div>
<div style="padding:0px 10px">
<span id="update_pull_request" class="btn btn-mini">${_('Save Changes')}</span>
</div>
%endif
</div>
%endif
</div>
</div>
white space cleanup
r2478
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 <div style="overflow: auto; clear: both">
Adde pull request voting recalculation
r2481 ##DIFF
Added editing of pull-request reviewers.
r2614 <div class="table" style="float:left;clear:none">
Adde pull request voting recalculation
r2481 <div id="body" class="diffblock">
small UI changes for pull-request view
r2482 <div style="white-space:pre-wrap;padding:5px">${_('Compare view')}</div>
Adde pull request voting recalculation
r2481 </div>
<div id="changeset_compare_view_content">
##CS
Basic implementation of cherry picking changesets...
r3023 <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${ungettext('Showing %s commit','Showing %s commits', len(c.cs_ranges)) % len(c.cs_ranges)}</div>
Adde pull request voting recalculation
r2481 <%include file="/compare/compare_cs.html" />
White space cleanup
r3029
Adde pull request voting recalculation
r2481 ## FILES
Basic implementation of cherry picking changesets...
r3023 <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">
White space cleanup
r3029
Basic implementation of cherry picking changesets...
r3023 % 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
White space cleanup
r3029
Basic implementation of cherry picking changesets...
r3023 </div>
<div class="cs_files">
%if not c.files:
<span class="empty_data">${_('No files')}</span>
%endif
Adde pull request voting recalculation
r2481 %for fid, change, f, stat in c.files:
<div class="cs_${change}">
<div class="node">${h.link_to(h.safe_unicode(f),h.url.current(anchor=fid))}</div>
<div class="changes">${h.fancy_file_stats(stat)}</div>
</div>
%endfor
</div>
Basic implementation of cherry picking changesets...
r3023 % if c.limited_diff:
Mads Kiilerich
Fix a lot of casings - use standard casing in most places
r3654 <h5>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("Showing a huge diff might take some time and resources")}')">${_('Show full diff')}</a></h5>
White space cleanup
r3029 % endif
Adde pull request voting recalculation
r2481 </div>
</div>
- pull request generates overview based on it's params...
r2440 </div>
<script>
var _USERS_AC_DATA = ${c.users_array|n};
Bradley M. Kuhn
Imported some of the GPLv3'd changes from RhodeCode v2.2.5....
r4116 var _GROUPS_AC_DATA = ${c.user_groups_array|n};
review members are dynamically changed based on selected other_repo owner...
r3388 // TODO: switch this to pyroutes
Enabled inline comments in pull-requests
r2489 AJAX_COMMENT_URL = "${url('pullrequest_comment',repo_name=c.repo_name,pull_request_id=c.pull_request.pull_request_id)}";
Added editing of pull-request reviewers.
r2614 AJAX_COMMENT_DELETE_URL = "${url('pullrequest_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}";
review members are dynamically changed based on selected other_repo owner...
r3388
pyroutes.register('pullrequest_comment', "${url('pullrequest_comment',repo_name='%(repo_name)s',pull_request_id='%(pull_request_id)s')}", ['repo_name', 'pull_request_id']);
pyroutes.register('pullrequest_comment_delete', "${url('pullrequest_comment_delete',repo_name='%(repo_name)s',comment_id='%(comment_id)s')}", ['repo_name', 'comment_id']);
pyroutes.register('pullrequest_update', "${url('pullrequest_update',repo_name='%(repo_name)s',pull_request_id='%(pull_request_id)s')}", ['repo_name', 'pull_request_id']);
whitespace cleanup
r3394
- pull request generates overview based on it's params...
r2440 </script>
## diff block
<%namespace name="diff_block" file="/changeset/diff_block.html"/>
%for fid, change, f, stat in c.files:
${diff_block.diff_block_simple([c.changes[fid]])}
%endfor
Basic implementation of cherry picking changesets...
r3023 % if c.limited_diff:
Mads Kiilerich
Fix a lot of casings - use standard casing in most places
r3654 <h4>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("Showing a huge diff might take some time and resources")}')">${_('Show full diff')}</a></h4>
Basic implementation of cherry picking changesets...
r3023 % endif
- pull request generates overview based on it's params...
r2440
## template for inline comment form
<%namespace name="comment" file="/changeset/changeset_file_comment.html"/>
Enabled inline comments in pull-requests
r2489 ${comment.comment_inline_form()}
white space cleanup
r2673
Added option to close pull requests, in future that will be close & merge
r2608 ## render comments and inlines
added a flag for generating pull-request comments, and force display on pull-requests
r3229 ${comment.generate_comments(include_pr=True)}
white space cleanup
r2673
Added option to close pull requests, in future that will be close & merge
r2608 % 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),
Mads Kiilerich
pull requests: make the difference between changeset comments with status and PR comments with votes more obvious
r4051 c.current_changeset_status,
is_pr=True, change_status=c.allowed_to_change_status)}
Added option to close pull requests, in future that will be close & merge
r2608 %endif
Enabled inline comments in pull-requests
r2489
<script type="text/javascript">
YUE.onDOMReady(function(){
Mads Kiilerich
html: don't use tabs
r3197 PullRequestAutoComplete('user', 'reviewers_container', _USERS_AC_DATA, _GROUPS_AC_DATA);
Enabled inline comments in pull-requests
r2489
YUE.on(YUQ('.show-inline-comments'),'change',function(e){
var show = 'none';
var target = e.currentTarget;
if(target.checked){
var show = ''
}
var boxid = YUD.getAttribute(target,'id_for');
var comments = YUQ('#{0} .inline-comments'.format(boxid));
for(c in comments){
YUD.setStyle(comments[c],'display',show);
}
var btns = YUQ('#{0} .inline-comments-button'.format(boxid));
for(c in btns){
YUD.setStyle(btns[c],'display',show);
}
})
YUE.on(YUQ('.line'),'click',function(e){
var tr = e.currentTarget;
injectInlineForm(tr);
});
// inject comments into they proper positions
var file_comments = YUQ('.inline-comment-placeholder');
renderInlineComments(file_comments);
white space cleanup
r3149
Added editing of pull-request reviewers.
r2614 YUE.on(YUD.get('update_pull_request'),'click',function(e){
review members are dynamically changed based on selected other_repo owner...
r3388 updateReviewers(undefined, "${c.repo_name}", "${c.pull_request.pull_request_id}");
Added editing of pull-request reviewers.
r2614 })
Enabled inline comments in pull-requests
r2489 })
</script>
Added basic models for saving open pull requests...
r2434 </div>
</%def>