|
Pierre-Yves Chibon |
706f31 |
{% extends "repo_master.html" %}
|
|
Pierre-Yves Chibon |
7732a9 |
{% from "_formhelper.html" import render_field_in_row %}
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
1a7791 |
{% block title %}Pull request #{{ request.id }} - {{ repo.name }}{% endblock %}
|
|
Pierre-Yves Chibon |
006f93 |
{%block tag %}home{% endblock %}
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
706f31 |
{% block repo %}
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
006f93 |
Request pull
|
|
Pierre-Yves Chibon |
ea8735 |
|
|
Pierre-Yves Chibon |
006f93 |
{{ repo.name }}
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
ea8735 |
(
|
|
Pierre-Yves Chibon |
006f93 |
repo=repo.name, identifier=commitid) }}"
|
|
Pierre-Yves Chibon |
006f93 |
>tree)
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
7732a9 |
{% if request %}
|
|
Pierre-Yves Chibon |
7732a9 |
Title: {{ request.title }}
|
|
Pierre-Yves Chibon |
840d94 |
{% if request.status and repo_admin %}
|
|
Pierre-Yves Chibon |
706f31 |
|
|
Pierre-Yves Chibon |
e580d4 |
|
|
Pierre-Yves Chibon |
038b0e |
repo=repo.name, requestid=requestid) }}" class="message">
|
|
Pierre-Yves Chibon |
e580d4 |
Merge
|
|
Pierre-Yves Chibon |
e580d4 |
|
|
Pierre-Yves Chibon |
706f31 |
|
|
Pierre-Yves Chibon |
840d94 |
{% elif request and request.status == False %}
|
|
Pierre-Yves Chibon |
706f31 |
Merged
|
|
Pierre-Yves Chibon |
706f31 |
{% endif %}
|
|
Pierre-Yves Chibon |
7732a9 |
{% endif %}
|
|
Pierre-Yves Chibon |
7732a9 |
|
|
Pierre-Yves Chibon |
006f93 |
<section class="commit_list"></section>
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
006f93 |
{% for commit in diff_commits %}
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
ea8735 |
|
|
Pierre-Yves Chibon |
006f93 |
repo=repo.name, commitid=commit.oid.hex)}}">
|
|
Pierre-Yves Chibon |
006f93 |
{{ commit.message.split('\n')[0] }}
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
006f93 |
{% endfor %}
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
7732a9 |
{% if form %}
|
|
Pierre-Yves Chibon |
7732a9 |
<section class="new_project"></section>
|
|
Pierre-Yves Chibon |
7732a9 |
|
|
Pierre-Yves Chibon |
7732a9 |
repo=repo.name, commitid=commitid) }}" method="post">
|
|
Pierre-Yves Chibon |
7732a9 |
|
|
Pierre-Yves Chibon |
7732a9 |
{{ render_field_in_row(form.title) }}
|
|
Pierre-Yves Chibon |
7732a9 |
|
|
Pierre-Yves Chibon |
7732a9 |
|
|
Pierre-Yves Chibon |
7732a9 |
<input class="submit positive button" type="submit" value="Create">
|
|
Pierre-Yves Chibon |
7732a9 |
<input class="button" onclick="history.back();" type="button" value="Cancel">
|
|
Pierre-Yves Chibon |
7732a9 |
{{ form.csrf_token }}
|
|
Pierre-Yves Chibon |
7732a9 |
|
|
Pierre-Yves Chibon |
7732a9 |
|
|
Pierre-Yves Chibon |
7732a9 |
|
|
Pierre-Yves Chibon |
7732a9 |
{% endif %}
|
|
Pierre-Yves Chibon |
7732a9 |
|
|
Pierre-Yves Chibon |
006f93 |
<section class="request_diff"></section>
|
|
Pierre-Yves Chibon |
006f93 |
Diff:
|
|
Pierre-Yves Chibon |
006f93 |
{% for html_diff in html_diffs %}
|
|
Pierre-Yves Chibon |
006f93 |
Commit: {{ diff_commits[loop.index - 1].oid.hex }}
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
006f93 |
Author
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
006f93 |
{{ diff_commits[loop.index - 1].author.name }} {{ '<' + diff_commits[loop.index - 1].author.email + '>' }}
|
|
Pierre-Yves Chibon |
006f93 |
- {{ diff_commits[loop.index - 1].commit_time }}
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
006f93 |
Committer
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
006f93 |
{{ diff_commits[loop.index - 1].committer.name }} {{ '<' + diff_commits[loop.index - 1].committer.email + '>' }}
|
|
Pierre-Yves Chibon |
006f93 |
- {{ diff_commits[loop.index - 1].commit_time }}
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
006f93 |
Parent
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
006f93 |
{% for parent in diff_commits[loop.index - 1].parents %}
|
|
Pierre-Yves Chibon |
ea8735 |
|
|
Pierre-Yves Chibon |
006f93 |
repo=repo.name, commitid=parent.oid.hex) }}">
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
006f93 |
{{ parent.oid.hex }}
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
006f93 |
{% endfor %}
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
006f93 |
{{ diff_commits[loop.index - 1].message }}
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
006f93 |
{% autoescape false %}
|
|
Pierre-Yves Chibon |
26ab24 |
{{ html_diff | format_loc(diff_commits[loop.index - 1], request) }}
|
|
Pierre-Yves Chibon |
006f93 |
{% endautoescape %}
|
|
Pierre-Yves Chibon |
006f93 |
{% endfor %}
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
006f93 |
|
|
Pierre-Yves Chibon |
267613 |
|
|
Pierre-Yves Chibon |
267613 |
{% endblock %}
|
|
Pierre-Yves Chibon |
267613 |
|
|
Pierre-Yves Chibon |
267613 |
{% block jscripts %}
|
|
Pierre-Yves Chibon |
267613 |
{{ super() }}
|
|
Pierre-Yves Chibon |
267613 |
<script type="text/javascript"></script>
|
|
Pierre-Yves Chibon |
267613 |
function comment() {
|
|
Pierre-Yves Chibon |
267613 |
$( ".cancel" ).click(
|
|
Pierre-Yves Chibon |
267613 |
function() {
|
|
Pierre-Yves Chibon |
267613 |
$(this).parent().parent().parent().parent().remove();
|
|
Pierre-Yves Chibon |
267613 |
}
|
|
Pierre-Yves Chibon |
267613 |
);
|
|
Pierre-Yves Chibon |
267613 |
};
|
|
Pierre-Yves Chibon |
267613 |
|
|
Pierre-Yves Chibon |
267613 |
$(function(){
|
|
Pierre-Yves Chibon |
267613 |
$( "tr" ).hover(
|
|
Pierre-Yves Chibon |
267613 |
function() {
|
|
Pierre-Yves Chibon |
267613 |
$( this ).find( "img" ).show().width(13);
|
|
Pierre-Yves Chibon |
267613 |
}, function() {
|
|
Pierre-Yves Chibon |
267613 |
$( this ).find( "img" ).hide();
|
|
Pierre-Yves Chibon |
267613 |
}
|
|
Pierre-Yves Chibon |
267613 |
);
|
|
Pierre-Yves Chibon |
267613 |
|
|
Pierre-Yves Chibon |
267613 |
$( ".prc" ).click(
|
|
Pierre-Yves Chibon |
267613 |
function() {
|
|
Pierre-Yves Chibon |
267613 |
var row = $( this ).attr('data-row');
|
|
Pierre-Yves Chibon |
267613 |
var commit = $( this ).attr('data-commit');
|
|
Pierre-Yves Chibon |
267613 |
var url = "{{ url_for(
|
|
Pierre-Yves Chibon |
267613 |
'pull_request_add_comment', username=username, repo=repo.name,
|
|
Pierre-Yves Chibon |
267613 |
requestid=requestid, commit='', row='') }}".slice(0, -1);
|
|
Pierre-Yves Chibon |
267613 |
url = url + commit + '/' + row;
|
|
Pierre-Yves Chibon |
5ce390 |
var current_row = $( this ).parent();
|
|
Pierre-Yves Chibon |
5ce390 |
var table = current_row.parent();
|
|
Pierre-Yves Chibon |
be1f52 |
var next_row = table.find('#' + (+row + 1)).parent().parent();
|
|
Pierre-Yves Chibon |
be1f52 |
if (current_row.next().find('.pr_comment_form').length == 0){
|
|
Pierre-Yves Chibon |
267613 |
$.get( url , function( data ) {
|
|
Pierre-Yves Chibon |
be1f52 |
next_row.before(
|
|
Pierre-Yves Chibon |
be1f52 |
'' + data + '' );
|
|
Pierre-Yves Chibon |
267613 |
comment();
|
|
Pierre-Yves Chibon |
267613 |
});
|
|
Pierre-Yves Chibon |
55a67c |
} else {
|
|
Pierre-Yves Chibon |
be1f52 |
current_row.next().find('.pr_comment_form').remove();
|
|
Pierre-Yves Chibon |
267613 |
}
|
|
Pierre-Yves Chibon |
267613 |
}
|
|
Pierre-Yves Chibon |
267613 |
);
|
|
Pierre-Yves Chibon |
267613 |
|
|
Pierre-Yves Chibon |
267613 |
});
|
|
Pierre-Yves Chibon |
267613 |
|
|
Pierre-Yves Chibon |
006f93 |
{% endblock %}
|