RSS Git Download  Clone
Raw Blame History
{% extends 'layout_page.twig' %}

{% set page = 'files' %}

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

{% block content %}
    {% include 'breadcrumb.twig' with {breadcrumbs: breadcrumbs} %}

    {% if fileType != 'image' and fileType != 'markdown'  %}
        <div class="pull-left">
            <div id="p3x-gitlist-file-small" style="display: none;">
                <button id="p3x-gitlist-file-small-button" class="btn btn-sm btn-primary">Parse code</button>
            </div>

            <div class="btn-group btn-toggle" id="p3x-gitlist-file-codemirror" style="display: none;">
                <button id="p3x-gitlist-file-button-scroll" class="btn btn-sm btn-primary">Scroll mode</button>
                <button id="p3x-gitlist-file-button-full" class="btn btn-sm btn-primary">Full height</button>
            </div>
        </div>
    {% endif %}

    <div class="btn-group pull-right">
        <a href="{{ path('blob_raw', {repo: repo, commitishPath: branch ~ '/' ~ file}) }}" class="btn btn-primary btn-sm"><span class="fa fa-file-text-o"></span> Raw</a>
        <a href="{{ path('blame', {repo: repo, commitishPath: branch ~ '/' ~ file}) }}" class="btn btn-primary btn-sm"><span class="fa fa-bullhorn"></span> Blame</a>
        <a href="{{ path('commits', {repo: repo, commitishPath: branch ~ '/' ~ file}) }}" class="btn btn-primary btn-sm"><span class="fa fa-list"></span> History</a>
    </div>
    <div style="clear: both; height: 5px;"></div>

    <div class="source-view">

        {% if fileType == 'image' %}
        <div class="text-center"><img src="{{ path('blob_raw', {repo: repo, commitishPath: branch ~ '/' ~ file}) }}" alt="{{ file }}" class="image-blob" /></div>

        {% elseif fileType == 'markdown' %}
        <div class="md-view"><div id="md-content">{{ blob }}</div></div>

        {% else %}
        <pre id="sourcecode" language="{{ fileType }}">{{ blob|htmlentities|raw }}</pre>
        {% endif %}
    </div>


{% endblock %}