RSS Git Download  Clone
Raw Blame History
{% extends 'layout-page.twig' %}

{% set page = 'commits' %}

{% block title %}P3X GitList{% endblock %}

{% block content %}

    {% embed 'breadcrumb.twig' with {breadcrumbs: [{dir: 'Blame', path:''}, {dir: file, path:''}]} %}

        {% block left %}
            {% if blames %}
                <span class="label label-info">Blames found: {{ blames | length }}</span>
                <span class="label label-info">Mode: {{ type }}</span>
                <span class="label label-info">Binary: {{ binary ? 'true' : 'false' }}</span>
            {% endif %}
        {%  endblock %}

    {% endembed %}



    {% if blames %}

        <div class="p3x-gitlist-overlay">
            <div>
                <i class="fas fa-cog fa-spin fa-4x"></i>
            </div>
            <br/>
            <div>
                Hang on, we reloading big blames...
            </div>
        </div>

        {% for blame in blames %}

        <div class="panel panel-default p3x-gitlist-file-fragment-panel" data-index="{{ loop.index0 }}" data-mode="{{ type }}">
            <div class="panel-heading">
                    <table style="width: 100%; background-color: transparent;" id="p3x-gitlilst-file-fragment-heading-table-{{ loop.index0 }}">
                        <tr>
                            <td>
                                <span class="far fa-file-alt"></span>&nbsp;&nbsp; <a id="{{ blame.commitShort }}" href="{{ path('commit', {repo: repo, commit: blame.commit}) }}">{{ blame.commitShort }}</a>
                            </td>
                            <td style="text-align: right;">
                                {% if not binary %}
                                <button data-commit-short="{{ blame.commitShort }}" class="btn btn-sm btn-primary" id="p3x-gitlilst-file-fragment-heading-button-codemirror-{{ loop.index0 }}">
                                    <i class="fas fa-eye"></i>&nbsp;&nbsp;Code Mirror
                                </button>
                                {% endif %}
                            </td>
                        </tr>
                    </table>

            </div>
            {% if not binary %}
                <div class="panel-body">

                    <div class="p3x-gitlist-file-fragment-text" id="p3x-gitlist-file-fragment-text-{{ loop.index0 }}">{{ blame.line }}</div>
                    <textarea class="hidden" id="p3x-gitlist-file-fragment-codemirror-{{ loop.index0 }}">{{ blame.line }}</textarea>
                </div>
            {% endif %}

        </div>

        {% endfor %}
    {% else %}
        <h4>
            No blames.
        </h4>
    {% endif %}






{% endblock %}