RSS Git Download  Clone
Raw Blame History
<nav aria-label="breadcrumb" style="margin-bottom: 0;">
    <ol class="breadcrumb mb-0">
        <li class="breadcrumb-item"><a href="{{ path('tree', {repo: repo, commitishPath: branch}) }}">{{ repo }}</a></li>
        {% for breadcrumb in breadcrumbs %}
            <li class="breadcrumb-item{% if loop.last %} active{% endif %}">{% if not loop.last %}<a
                    href="{{ path('tree', {repo: repo, commitishPath: branch ~ '/' ~ breadcrumb.path}) }}">{{ breadcrumb.dir }}</a>{% endif %}{% if loop.last %}{{ breadcrumb.dir }}{% endif %}
            </li>
        {% endfor %}
    </ol>
</nav>


<div class="p3x-gitlist-breadcrumb-divider"></div>

<div class="float-end p3x-gitlist-button" style="text-align: right;">
    <div>
        <a href="{{ path('rss', {repo: repo, branch: branch}) }}" class="btn btn-secondary btn-sm">
            <i class="fa fa-rss"></i>
            &nbsp;{{ 'breadcrumb.rss'|t }}
        </a>

        <span class="dropdown">
            <a class="btn btn-secondary btn-sm dropdown-toggle" type="button" id="p3x-gitlist-breadcrumb-git"
               data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
                {{ 'breadcrumb.git'|t }}            </a>
            <ul class="dropdown-menu" aria-labelledby="p3x-gitlist-breadcrumb-git">
                <li data-bs-toggle="tooltip" data-bs-placement="bottom"
                    title="{{ 'breadcrumb.git.fetch_origin.tooltip'|t }}">
                    <a class="dropdown-item" href="javascript:void(0)" id="p3x-gitlist-breadcrumb-git-fetch">
                        <i class="fas fa-chevron-down"></i>&nbsp;{{ 'breadcrumb.git.fetch_origin'|t }}
                    </a>
                </li>
            </ul>
        </span>

        <span class="dropdown">
            <a class="btn btn-secondary btn-sm dropdown-toggle" type="button" id="p3x-gitlist-breadcrumb-download"
               data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
                {{ 'breadcrumb.download'|t }}            </a>
            <ul class="dropdown-menu" aria-labelledby="p3x-gitlist-breadcrumb-download">
                <li>
                    <a class="dropdown-item" href="{{ path('archive', {repo: repo, branch: branch, format: 'zip'}) }}"
                       title="Download '{{ branch }}' as a ZIP archive">
                        <i class="fas fa-file-archive"></i>&nbsp;{{ 'breadcrumb.download.zip'|t }}
                    </a>
                </li>
                <li>
                    <a class="dropdown-item" href="{{ path('archive', {repo: repo, branch: branch, format: 'tar'}) }}"
                       title="Download '{{ branch }}' as a TAR archive">
                        <i class="far fa-file-archive"></i>&nbsp;{{ 'breadcrumb.download.tar'|t }}
                    </a>
                </li>
            </ul>
        </span>

        {% if app.show_http_remote or app.show_ssh_remote %}
            <a href="#" class="btn btn-secondary btn-sm" title="{{ 'breadcrumb.clone.tooltip'|t }}"
               data-bs-toggle="modal" data-bs-target="#p3x-gitlist-modal-clone">
                <i class="far fa-clone"></i>&nbsp;{{ 'breadcrumb.clone'|t }}
            </a>
        {% endif %}

        {% block right %}{% endblock %}

    </div>
</div>

{% block left %}{% endblock %}


{% if app.show_http_remote or app.show_ssh_remote %}

    <!-- Modal -->
    <div id="p3x-gitlist-modal-clone" class="modal fade" role="dialog" tabindex="-1">
        <div class="modal-dialog">

            <!-- Modal content-->
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                    <h4 class="modal-title"><strong>{{ 'breadcrumb.clone'|t }}</strong></h4>
                </div>
                <div class="modal-body">

                    <div style="text-align: center">
                        <div class="btn-group">
                            {% if app.show_ssh_remote %}
                                <button type="button"
                                        class="btn btn-primary{{ app.show_ssh_remote and app.show_http_remote ? ' active' }}"
                                        id="clone-button-ssh">{{ 'breadcrumb.clone.ssh'|t }}
                                </button>
                            {% endif %}
                            {% if app.show_http_remote %}
                                <button type="button" class="btn btn-primary" id="clone-button-http">{{ 'breadcrumb.clone.https'|t }}</button>
                            {% endif %}
                        </div>
                    </div>
                    <br/>


                    {% if app.show_ssh_remote %}
                        <input readonly
                               type="text" class="form-control{{ app.show_ssh_remote ? ' visible' }}"
                               id="clone-input-ssh"
                               value="git clone ssh://{{ app.ssh_user | url_encode }}{{ app.ssh_user ? '@' }}{{ global.request.host }}:{{ app.ssh_clone_subdir }}{{ repo }}">
                    {% endif %}
                    {% if app.show_http_remote %}
                        <input type="text"
                               readonly
                               class="form-control{{ app.show_ssh_remote is empty and app.show_http_remote ? ' visible' }}"
                               id="clone-input-http"
                               value="git clone http{{ app.use_https ? 's' }}://{{ app.http_user | url_encode }}{{ app.http_user ? '@' }}{{ global.request.host }}{{ app.git_http_subdir_calculated ? app.url_subdir : app.git_http_subdir }}/{{ repo }}">
                    {% endif %}


                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">
                        <span class="fas fa-times"></span>
                        {{ 'common.close'|t }}
                    </button>
                </div>
            </div>

        </div>
    </div>

{% endif %}

<div class="p3x-gitlist-breadcrumb-divider"></div>