{% extends "repo_master.html" %} {% from "_formhelper.html" import render_field_in_row, show_comment, render_bootstrap_field %} {% block title %} {%- if pull_request -%} PR#{{ requestid }}: {{ pull_request.title | noJS(ignore="img")}} - {{ repo.name }} {% elif form and (repo_admin or remote_git) %} Create new Pull Request for {{ branch_to }} - {{ repo.name }} {%- else -%} Diff from {{ branch_from }} to {{ branch_to }} - {{ repo.name }} {%- endif -%} {% endblock %} {% set tag = "home" %} {% block header %} {% endblock %} {% block repo %}
{% if pull_request %}

PR#{{requestid}} {% if pull_request.status != 'Open'%} {{pull_request.status}} {% endif %} {{ pull_request.title | noJS(ignore="img") | safe}} {% if authenticated and (g.fas_user.username == pull_request.user.username or repo_admin) and pull_request.status == 'Open'%} {% if pull_request.status == 'Open' and authenticated and (repo_admin or g.fas_user.username == pull_request.user.username) %}
{% endif %}
{% if pull_request.status == 'Open' and authenticated and (repo_admin or g.fas_user.username == pull_request.user.username) %} {{ mergeform.csrf_token }} {% endif %}
{% if pull_request.status == 'Open' and authenticated and (repo_admin or g.fas_user.username == pull_request.user.username) %}
{% endif %}
{% endif %}

Proposed {{ pull_request.date_created |humanize }} by {{ pull_request.user.default_email | avatar(16) | safe }} {{ pull_request.user.user }}
From {{ pull_request.project_from.fullname or pull_request.remote_git }} {{ pull_request.branch_from }}  into {{ pull_request.project.fullname }} {{ pull_request.branch }} {% elif form and (repo_admin or remote_git) %}

Create pull request

{% else %}

Diff (tree)

{% endif %} {% if form and (repo_admin or remote_git) %}
{% if remote_git %}
{% else %} {% endif %}
Pull from {% if remote_git -%}{{ remote_git }}{%- else -%} {{ repo.fullname }} {%- endif -%} {{ branch_from }} into {% if repo.is_fork -%}{{ repo.parent.fullname }}{% else %}{{ repo.fullname }}{% endif %}  
{% if contributing %}
{{ contributing | markdown | noJS | safe}}
{% endif %} {{ render_bootstrap_field(form.title) }}

{{ form.csrf_token }} Cancel

{% endif %}
{% if authenticated and pull_request %}
{% endif %} {% if diff %} {% for patch in diff %} {% if patch |hasattr('new_id') %} {% set patch_new_id = patch.new_id %} {% elif patch |hasattr('delta') %} {% set patch_new_id = patch.delta.new_file.id %} {% else %} {% set patch_new_id = patch.new_oid %} {% endif %} {% if patch | hasattr('new_file_path') %} {% set patch_new_file_path = patch.new_file_path -%} {% if patch.new_file_path != patch.old_file_path %} {% set patch_old_file_path = patch.old_file_path %} {%- endif -%} {%- elif patch | hasattr('delta') -%} {% set patch_new_file_path = patch.delta.new_file.path -%} {%- if patch.delta.new_file.path != patch.delta.old_file.path -%} {% set patch_old_file_path = patch.delta.old_file.path %} {%- endif -%} {%- endif -%}
{%- if patch_new_file_path == patch_old_file_path -%} {{ patch_new_file_path }} (Renamed from "{{ patch_old_file_path }}") {%- else -%} {{ patch_new_file_path }} {%- endif -%} {% if pull_request %} View
{% autoescape false %} {{ patch | patch_to_diff | html_diff | format_loc( filename=patch_new_file_path, commit=patch_new_id, prequest=pull_request, index=loop.index, tree_id=diff_commits[0].tree.id)}} {% endautoescape %}
{% endfor %} {% endif %} {% if authenticated and pull_request %} {{ mergeform.csrf_token }}
{% endif %}
{% if pull_request %}
{% if pull_request.comments %}
{% for comment in pull_request.comments %} {% if comment.commit_id %}
{{comment.user.user}} commented on line {{ comment.line}} of {{comment.filename}}.
{{ comment.date_created | humanize}}
(Show)
{{ comment.comment }}
{% elif comment.notification %}
{{ comment.comment }}
{{ comment.date_created | humanize}}
{% else %} {{ show_comment(comment, comment.id, repo, username, requestid, form, repo_admin) }} {% endif %} {% endfor %} {{ mergeform.csrf_token }}
{% endif %}
{% if authenticated and mergeform and pull_request %}
{% if authenticated %}
{{ mergeform.csrf_token }}
Preview
Markdown Syntax
{% else %}

Login to comment on this ticket.

{% endif %}
{% endif %}
{% endif %}
{% if pull_request %}
{% if pull_request.status != 'Open'%} {% endif %} {% if pull_request.flags %}
    {% for flag in pull_request.flags %}
  • {{ flag.username }}
    {{ flag.percent }}%
    {{ flag.comment }}
    {{ flag.date_created | humanize }}
  • {% endfor %}
{% endif %}
{% if authenticated and mergeform and pull_request.status == 'Open' %}
{% endif %} {% if authenticated and mergeform and pull_request.status == 'Open' %}
{% endif %}
{% endif %} {% if diff and pull_request%}
Changes summary
{% for patch in diff %}
{%- if patch | hasattr('new_file_path') -%} {%- if patch.new_file_path == patch.old_file_path -%} {{ patch.new_file_path }} {%- else -%} {{ patch.new_file_path }} (Renamed from "{{ patch.old_file_path }}") {%- endif -%} {%- elif patch | hasattr('delta') -%} {%- if patch.delta.new_file.path == patch.delta.old_file.path -%} {{ patch.delta.new_file.path }} {%- else -%} {{ patch.delta.new_file.path }} (Renamed from "{{ patch.delta.old_file.path }}") {%- endif -%} {%- endif -%}
{% if patch | hasattr('additions') %} {# Version of pygit2 -0.21.4 -- F21/EL7 #} {% if (patch.additions + patch.deletions) %} {% if patch.additions > 0 %}+{{ patch.additions }}{% endif %} {% if patch.deletions > 0 %}-{{ patch.deletions }}{% endif %} {% endif %} {% else %} {# Version of pygit2 -0.23.0 -- F23 #} {% if (patch.line_stats[1] + patch.line_stats[2]) %} {% if patch.line_stats[1] > 0 %}+{{ patch.line_stats[1] }}{% endif %} {% if patch.line_stats[2] > 0 %}-{{ patch.line_stats[2] }}{% endif %} {% endif %} {% endif %}
{% endfor %}
{% endif %}
{% endblock %} {% block jscripts %} {{ super() }} {% if config['EVENTSOURCE_SOURCE'] and pull_request %} {% endif %} {% endblock %}