##// END OF EJS Templates
tests: re-use assert_session_flash to also test for negative cases....
tests: re-use assert_session_flash to also test for negative cases. - removes code duplication

File last commit:

r1910:45702bf2 default
r1925:2c37cda7 default
Show More
pullrequest_merge_checks.mako
63 lines | 3.2 KiB | application/x-mako | MakoHtmlLexer
/ rhodecode / templates / pullrequests / pullrequest_merge_checks.mako
pull-request: introduced new merge-checks....
r1334
<div class="pull-request-wrap">
pull-requests: unified merge checks....
r1335 % if c.pr_merge_possible:
<h2 class="merge-status">
<span class="merge-icon success"><i class="icon-true"></i></span>
${_('This pull request can be merged automatically.')}
</h2>
% else:
<h2 class="merge-status">
<span class="merge-icon warning"><i class="icon-false"></i></span>
${_('Merge is not currently possible because of below failed checks.')}
</h2>
% endif
pull-request: introduced new merge-checks....
r1334 <ul>
comments: show links to unresolved todos...
r1344 % for pr_check_key, pr_check_details in c.pr_merge_errors.items():
<% pr_check_type = pr_check_details['error_type'] %>
pull-request: introduced new merge-checks....
r1334 <li>
<span class="merge-message ${pr_check_type}" data-role="merge-message">
comments: show links to unresolved todos...
r1344 - ${pr_check_details['message']}
% if pr_check_key == 'todo':
% for co in pr_check_details['details']:
comments: fix scroll to comments that are outdated. Auto-show them on scroll.
r1388 <a class="permalink" href="#comment-${co.comment_id}" onclick="Rhodecode.comments.scrollToComment($('#comment-${co.comment_id}'), 0, ${h.json.dumps(co.outdated)})"> #${co.comment_id}</a>${'' if loop.last else ','}
comments: show links to unresolved todos...
r1344 % endfor
% endif
pull-request: introduced new merge-checks....
r1334 </span>
</li>
% endfor
</ul>
<div class="pull-request-merge-actions">
% if c.allowed_to_merge:
<div class="pull-right">
pyramid: stop relying on global mako url() function....
r1910 ${h.secure_form(h.url('pullrequest_merge', repo_name=c.repo_name, pull_request_id=c.pull_request.pull_request_id), id='merge_pull_request_form')}
pull-requests: unified merge checks....
r1335 <% merge_disabled = ' disabled' if c.pr_merge_possible is False else '' %>
pull-request: introduced new merge-checks....
r1334 <a class="btn" href="#" onclick="refreshMergeChecks(); return false;">${_('refresh checks')}</a>
<input type="submit" id="merge_pull_request" value="${_('Merge Pull Request')}" class="btn${merge_disabled}"${merge_disabled}>
${h.end_form()}
</div>
% elif c.rhodecode_user.username != h.DEFAULT_USER:
<a class="btn" href="#" onclick="refreshMergeChecks(); return false;">${_('refresh checks')}</a>
<input type="submit" value="${_('Merge Pull Request')}" class="btn disabled" disabled="disabled" title="${_('You are not allowed to merge this pull request.')}">
% else:
<input type="submit" value="${_('Login to Merge this Pull Request')}" class="btn disabled" disabled="disabled">
% endif
</div>
pull-requests: add explicit CLOSE pr action instead of closed status from selector....
r1445
% if c.allowed_to_close:
## close PR action, injected later next to COMMENT button
<div id="close-pull-request-action" style="display: none">
% if c.pull_request_review_status == c.REVIEW_STATUS_APPROVED:
<a class="btn btn-approved-status" href="#close-as-approved" onclick="closePullRequest('${c.REVIEW_STATUS_APPROVED}'); return false;">
${_('Close with status {}').format(h.commit_status_lbl(c.REVIEW_STATUS_APPROVED))}
</a>
% else:
<a class="btn btn-rejected-status" href="#close-as-rejected" onclick="closePullRequest('${c.REVIEW_STATUS_REJECTED}'); return false;">
${_('Close with status {}').format(h.commit_status_lbl(c.REVIEW_STATUS_REJECTED))}
</a>
% endif
</div>
% endif
pull-request: introduced new merge-checks....
r1334 </div>