diff --git a/progit/templates/pull_request.html b/progit/templates/pull_request.html index d79a363..95dc4d2 100644 --- a/progit/templates/pull_request.html +++ b/progit/templates/pull_request.html @@ -34,7 +34,7 @@
{{ mergeform.csrf_token }} - +
{% elif pull_request and pull_request.status == False %} @@ -53,16 +53,17 @@ {% if form %}
+ repo=repo.name, commitid=commitid, branch_from=branch_from, + branch_to=branch_to) }}" method="post"> {{ render_field_in_row(form.title) }} + {% endfor %} + -{% for patch in diff %} -
-
-

{{ patch.new_file_path }}

-
    -
  • - {% if (patch.additions + patch.deletions) %} - - {% if patch.additions > 0 %}+{{ patch.additions }}{% endif %} - {% if patch.deletions > 0 %}-{{ patch.deletions }}{% endif %} - - {% endif %} -
  • -
  • - View -
  • -
-
+{% if diff %} +{% autoescape false %} + {{ diff.patch|html_diff|format_loc(prequest=pull_request)}} +{% endautoescape %} +{% endif %} - {% if patch.is_binary %} -

Binary diffs cannot be rendered.

- {% else %} - {% autoescape false %} - {{ patch|patch_to_diff|html_diff|format_loc(diff_commits[loop.index - 1], pull_request, - index=loop.index)}} - {% endautoescape %} - {% endif %}
-{% endfor %} - {% endfor %} - + {% endblock %} @@ -218,30 +151,18 @@ $(function(){ $( "#branch_select" ).change( function() { - var url = $(location).attr('href').split('?')[0]; - var params = $(location).attr('search').replace('?', '').split('&'); var sel = $('#branch_select'); - /* Check all the current argument in the URL */ - var changed = false; - for (i = 0; i < params.length; i++) { - /* If we find branch=, updated it */ - if (params[i].match("^branch=")) { - params[i] = 'branch=' + sel.val(); - changed = true; - } - } - /* Otherwise add it */ - if (!changed) { - params.push('branch=' + sel.val()); - } - var final_url = url + '?' + params.join('&'); + var final_url = "{{ url_for('.new_request_pull', username=username, + repo=repo.name, commitid=commitid, branch_from=branch_from, + branch_to='--') }}"; + final_url = final_url.replace('--', sel.val()); window.location.href = final_url; } ); {% if pull_request %} {# These lines are only for existing pull-requests, not new ones #} $('#cancel_pr').click(function(){ - return window.confirm("Are you sure you want to cancel this requested pull?"); + return window.confirm("Are you sure you want to close this requested pull?"); }); });
To branch - + {% for branch in branches |reverse %} - {% if branch != branchname %} + {% if branch != branch_to %} {% endif %} {% endfor %} @@ -102,59 +103,16 @@ -
- {% for commit in diff_commits %} - {% set splitted_message = commit.message.split('\n') %} - {% set diff = diffs[loop.index - 1] %} - {% set commitid = commit.oid.hex %} -
-

- {{ splitted_message[0] }} - (commit: {{ commitid|short }} - - tree) - {% if splitted_message|length > 1 %} - - {% for message in splitted_message %} - {% if loop.index > 1 %} - {{ message }} - {% endif %} - {% endfor %} - - {% endif %} -

-
+
+ +
- - - - - - - - - + + {% for patch in diff %} - - - - - -
Author - {{ commit.author.name }} {{ '<' + commit.author.email + '>' }} - - {{ commit.commit_time | format_ts}} -
Committer - {{ commit.committer.name }} {{ '<' + commit.committer.email + '>' }} - - {{ commit.commit_time | format_ts }} -
ParentChanges - {% for parent in commit.parents %} - - {{ parent.oid.hex }} -
- {% endfor %} -
Changes
    {% for patch in diff %}
  • @@ -170,44 +128,19 @@
  • {% endfor %}
-
+