|
|
|
|
|
<div class="panel panel-default">
|
|
|
<div class="panel-body">
|
|
|
<div class="field">
|
|
|
%if c.show_closed:
|
|
|
${h.checkbox('show_closed',checked="checked", label=_('Show Closed Pull Requests'))}
|
|
|
%else:
|
|
|
${h.checkbox('show_closed',label=_('Show Closed Pull Requests'))}
|
|
|
%endif
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div class="panel panel-default">
|
|
|
<div class="panel-heading">
|
|
|
<h3 class="panel-title">${_('Pull Requests You Opened')}</h3>
|
|
|
</div>
|
|
|
|
|
|
<div class="panel-body">
|
|
|
<div class="pullrequestlist">
|
|
|
%if c.my_pull_requests:
|
|
|
%for pull_request in c.my_pull_requests:
|
|
|
<div class="${'closed' if pull_request.is_closed() else ''} prwrapper">
|
|
|
<div class="pr">
|
|
|
<div class="${'flag_status %s' % pull_request.calculated_review_status()} pull-left"></div>
|
|
|
<a href="${h.url('pullrequest_show',repo_name=pull_request.target_repo.repo_name,pull_request_id=pull_request.pull_request_id)}">
|
|
|
${_('Pull request #%s opened on %s') % (pull_request.pull_request_id, h.format_date(pull_request.created_on))}
|
|
|
%if pull_request.is_closed():
|
|
|
(${_('Closed')})
|
|
|
%endif
|
|
|
</a>
|
|
|
<div class="repolist_actions">
|
|
|
${h.secure_form(url('pullrequest_delete', repo_name=pull_request.target_repo.repo_name, pull_request_id=pull_request.pull_request_id),method='delete')}
|
|
|
${h.submit('remove_%s' % pull_request.pull_request_id, _('Delete'),
|
|
|
class_="btn btn-link btn-danger",onclick="return confirm('"+_('Confirm to delete this pull request')+"');")}
|
|
|
${h.end_form()}
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
%endfor
|
|
|
%else:
|
|
|
<h2><span class="empty_data">${_('You currently have no open pull requests.')}</span></h2>
|
|
|
%endif
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div class="panel panel-default">
|
|
|
<div class="panel-heading">
|
|
|
<h3 class="panel-title">${_('Pull Requests You Participate In')}</h3>
|
|
|
</div>
|
|
|
|
|
|
<div class="panel-body">
|
|
|
<div class="pullrequestlist">
|
|
|
%if c.participate_in_pull_requests:
|
|
|
%for pull_request in c.participate_in_pull_requests:
|
|
|
<div class="${'closed' if pull_request.is_closed() else ''} prwrapper">
|
|
|
<div class="pr">
|
|
|
<div class="${'flag_status %s' % pull_request.calculated_review_status()} pull-left"></div>
|
|
|
<a href="${h.url('pullrequest_show',repo_name=pull_request.target_repo.repo_name,pull_request_id=pull_request.pull_request_id)}">
|
|
|
${_('Pull request #%s opened by %s on %s') % (pull_request.pull_request_id, pull_request.author.full_name, h.format_date(pull_request.created_on))}
|
|
|
</a>
|
|
|
%if pull_request.is_closed():
|
|
|
(${_('Closed')})
|
|
|
%endif
|
|
|
</div>
|
|
|
</div>
|
|
|
%endfor
|
|
|
%else:
|
|
|
<li><span class="empty_data">${_('There are currently no open pull requests requiring your participation.')}</span></li>
|
|
|
%endif
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<script>
|
|
|
$('#show_closed').on('click', function(e){
|
|
|
if($(this).is(":checked")){
|
|
|
window.location = "${h.url('my_account_pullrequests', pr_show_closed=1)}";
|
|
|
}
|
|
|
else{
|
|
|
window.location = "${h.url('my_account_pullrequests')}";
|
|
|
}
|
|
|
})
|
|
|
</script>
|
|
|
|