##// END OF EJS Templates
set the status of changesets initially on pull request, and make sure we care of version collisions....
set the status of changesets initially on pull request, and make sure we care of version collisions. Fixes issues #690 and #587

File last commit:

r3175:5d1d25c1 beta
r3175:5d1d25c1 beta
Show More
pullrequest_show.html
228 lines | 10.1 KiB | text/html | HtmlLexer
Added basic models for saving open pull requests...
r2434 <%inherit file="/base/base.html"/>
<%def name="title()">
${c.repo_name} ${_('Pull request #%s') % c.pull_request.pull_request_id}
</%def>
<%def name="breadcrumbs_links()">
Takumi IINO
i18n 'Home' in breadcrumbs
r2492 ${h.link_to(_(u'Home'),h.url('/'))}
Added basic models for saving open pull requests...
r2434 &raquo;
${h.link_to(c.repo_name,h.url('changelog_home',repo_name=c.repo_name))}
&raquo;
${_('Pull request #%s') % c.pull_request.pull_request_id}
</%def>
<%def name="main()">
<div class="box">
<!-- box / title -->
<div class="title">
${self.breadcrumbs()}
</div>
Added option to close pull requests, in future that will be close & merge
r2608 %if c.pull_request.is_closed():
Fixed status of changesets in preview windows...
r2803 <div style="padding:10px; font-size:22px;width:100%;text-align: center; color:#88D882">${_('Closed %s') % (h.age(c.pull_request.updated_on))} ${_('with status %s') % h.changeset_status_lbl(c.current_changeset_status)}</div>
white space cleanup
r2673 %endif
new summary for opened pull requests...
r2712 <h3>${_('Title')}: ${c.pull_request.title}</h3>
White space cleanup
r2815
new summary for opened pull requests...
r2712 <div class="form">
<div id="summary" class="fields">
<div class="field">
<div class="label-summary">
<label>${_('Status')}:</label>
</div>
<div class="input">
<div class="changeset-status-container" style="float:none;clear:both">
%if c.current_changeset_status:
<div title="${_('Pull request status')}" class="changeset-status-lbl">[${h.changeset_status_lbl(c.current_changeset_status)}]</div>
<div class="changeset-status-ico" style="padding:1px 4px"><img src="${h.url('/images/icons/flag_status_%s.png' % c.current_changeset_status)}" /></div>
%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:
<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>
%else:
white space cleanup
r2907 <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>
##%if h.is_hg(c.pull_request.org_repo):
## <img class="icon" title="${_('Mercurial repository')}" alt="${_('Mercurial repository')}" src="${h.url('/images/icons/hgicon.png')}"/>
##%elif h.is_git(c.pull_request.org_repo):
## <img class="icon" title="${_('Git repository')}" alt="${_('Git repository')}" src="${h.url('/images/icons/giticon.png')}"/>
##%endif
<span class="spantag">${c.pull_request.org_ref_parts[0]}</span>
:
<span class="spantag">${c.pull_request.org_ref_parts[1]}</span>
set the status of changesets initially on pull request, and make sure we care of version collisions....
r3175 <span><a href="${h.url('summary_home', repo_name=c.pull_request.org_repo.repo_name)}">${c.pull_request.org_repo.clone_url()}</a></span>
implemented #725 Pull Request View - Show origin repo URL
r3170 </div>
</div>
</div>
new summary for opened pull requests...
r2712 </div>
White space cleanup
r2815 </div>
small UI changes for pull-request view
r2482 <div style="white-space:pre-wrap;padding:3px 3px 5px 20px">${h.literal(c.pull_request.description)}</div>
<div style="padding:4px 4px 10px 20px">
<div>${_('Created on')}: ${h.fmt_date(c.pull_request.created_on)}</div>
- pull request generates overview based on it's params...
r2440 </div>
white space cleanup
r2478
Basic implementation of cherry picking changesets...
r3023 <div style="overflow: auto;">
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:
<h5>${_('Changeset was too big and was cut off...')}</h5>
White space cleanup
r3029 % endif
Adde pull request voting recalculation
r2481 </div>
</div>
Added editing of pull-request reviewers.
r2614 ## REVIEWERS
<div style="float:left; border-left:1px dashed #eee">
<h4>${_('Pull request reviewers')}</h4>
Basic implementation of cherry picking changesets...
r3023 <div id="reviewers" style="padding:0px 0px 5px 10px">
Added editing of pull-request reviewers.
r2614 ## members goes here !
Basic implementation of cherry picking changesets...
r3023 <div class="group_members_wrap" style="min-height:45px">
Added editing of pull-request reviewers.
r2614 <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 style="float:left;padding:0px 3px 0px 0px" class="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')))}"/>
white space cleanup
r2673 </div>
Added editing of pull-request reviewers.
r2614 <div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(member.email,14)}"/> </div>
fixed labels in reviewers list
r3105 <div style="float:left">${member.full_name} (${_('owner') if c.pull_request.user_id == member.user_id else _('reviewer')})</div>
Added editing of pull-request reviewers.
r2614 <input type="hidden" value="${member.user_id}" name="review_members" />
fixed labels in reviewers list
r3105 %if not c.pull_request.is_closed() and (h.HasPermissionAny('hg.admin', 'repository.admin')() or c.pull_request.user_id == c.rhodecode_user.user_id):
Added editing of pull-request reviewers.
r2614 <span class="delete_icon action_button" onclick="removeReviewer(${member.user_id})"></span>
%endif
</div>
</li>
%endfor
</ul>
white space cleanup
r2673 </div>
Added editing of pull-request reviewers.
r2614 %if not c.pull_request.is_closed():
<div class='ac'>
Hide add/delete pull request members when you don't have permission for it
r2770 %if h.HasPermissionAny('hg.admin', 'repository.admin')() or c.pull_request.author.user_id == c.rhodecode_user.user_id:
Added editing of pull-request reviewers.
r2614 <div class="reviewer_ac">
${h.text('user', class_='yui-ac-input')}
<span class="help-block">${_('Add reviewer to this pull request.')}</span>
white space cleanup
r2673 <div id="reviewers_container"></div>
Added editing of pull-request reviewers.
r2614 </div>
<div style="padding:0px 10px">
<span id="update_pull_request" class="ui-btn xsmall">${_('save')}</span>
</div>
Hide add/delete pull request members when you don't have permission for it
r2770 %endif
Added editing of pull-request reviewers.
r2614 </div>
%endif
white space cleanup
r2673 </div>
</div>
- pull request generates overview based on it's params...
r2440 </div>
<script>
var _USERS_AC_DATA = ${c.users_array|n};
var _GROUPS_AC_DATA = ${c.users_groups_array|n};
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__')}";
AJAX_UPDATE_PULLREQUEST = "${url('pullrequest_update',repo_name=c.repo_name,pull_request_id=c.pull_request.pull_request_id)}"
- 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:
<h4>${_('Changeset was too big and was cut off...')}</h4>
% 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
${comment.generate_comments()}
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),
c.current_changeset_status,
Implemented #670 Implementation of Roles in Pull Request...
r3104 close_btn=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(){
Added editing of pull-request reviewers.
r2614 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){
remove reviewers button removes them without need of hitting save button.
r3106 updateReviewers();
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>