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

{% set page = 'files' %}

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

{% block content %}

    {% embed 'breadcrumb.twig' with {breadcrumbs: breadcrumbs} %}

        {% block left %}
            {% if results %}
                <button type="button" class="btn btn-primary btn-sm">File count: {{ results | length }}</button>
            {% endif %}
        {%  endblock %}

    {% endembed %}


    {% if results %}

        {% for result in results %}
            <div class="panel panel-default">
                <div class="panel-heading">
                    <span class="far fa-file-alt"></span>&nbsp;&nbsp;<a href="{{ path('blob', {repo: repo, branch: branch, file: result.file, commitishPath: branch ~ '/' ~ result.file}) }}&codemirror=1&query={{ search_query }}#L{{ result.line }}">{{ result.file }}</a>
                </div>
                <div class="panel-body p3x-gitlist-search-match">{{ result.match }}</div>
            </div>
        {% endfor %}
    {% else %}
        <h4>
            The search found no result.
        </h4>
    {% endif %}


{% endblock %}