<commit_before>{#
 # Part of the ETD Framework Twig Macros Package
 #
 # @copyright   Copyright (C) 2015 ETD Solutions. Tous droits réservés.
 # @license     Apache License 2.0; see LICENSE
 # @author      ETD Solutions http://etd-solutions.com
 #}

{%- set titleCol = titleCol|default(0) -%}
{%- set filterCol = filterCol|default(0) -%}
{%- set buttonsCol = buttonsCol|default(0) -%}
{%- if titleCol == 0 and filterCol == 0 and buttonsCol == 0 -%}
    {%- if toolbar.title is not empty -%}

        {%- set titleCol = 12 -%}

        {%- if toolbar.filterForm is not null and toolbar.buttons is empty -%}
            {%- set titleCol = 6 -%}
            {%- set filterCol = 6 -%}
        {%- endif -%}

        {%- if toolbar.filterForm is null and toolbar.buttons is not empty -%}
            {%- set titleCol = 6 -%}
            {%- set buttonsCol = 6 -%}
        {%- endif -%}

        {%- if toolbar.filterForm is not null and toolbar.buttons is not empty -%}
            {%- set titleCol = 4 -%}
            {%- set filterCol = 4 -%}
            {%- set buttonsCol = 4 -%}
        {%- endif -%}

    {%- else -%}

        {%- if toolbar.filterForm is not null -%}
            {%- set filterCol = 12 -%}

            {%- if toolbar.buttons is not empty -%}
                {%- set filterCol = 6 -%}
                {%- set buttonsCol = 6 -%}
            {%- endif -%}

        {%- else -%}

            {%- set buttonsCol = 12 -%}

        {%- endif -%}

    {%- endif -%}
{%- endif -%}
{% if titleCol > 0 or filterCol > 0 or buttonsCol > 0 %}
<div id="toolbar" class="container-fluid">
    <div class="row">
        {% if toolbar.title is not empty %}
            <div class="col-md-{{ titleCol }}">
                <h1>{{ toolbar.title }}</h1>
            </div>
        {% endif %}
        {% if toolbar.filterForm is not null %}
            <div class="col-md-{{ filterCol }}">
                {% include "parts/filterform.twig" with {"form":toolbar.filterForm} only %}
            </div>
        {% endif %}
        {% if toolbar.buttons is not empty %}
            <div class="col-md-{{ buttonsCol }}">
                <div class="btn-toolbar text-right" role="toolbar" aria-label="Barre d'outils">
                    {% for button in toolbar.buttons %}
                        {{ button.render()|raw }}
                    {% endfor %}
                </div>
            </div>
        {% endif %}
    </div>
</div><commit_msg>add subtitle<commit_after>{#
 # Part of the ETD Framework Twig Macros Package
 #
 # @copyright   Copyright (C) 2015 ETD Solutions. Tous droits réservés.
 # @license     Apache License 2.0; see LICENSE
 # @author      ETD Solutions http://etd-solutions.com
 #}

{%- set titleCol = titleCol|default(0) -%}
{%- set filterCol = filterCol|default(0) -%}
{%- set buttonsCol = buttonsCol|default(0) -%}
{%- if titleCol == 0 and filterCol == 0 and buttonsCol == 0 -%}
    {%- if toolbar.title is not empty -%}

        {%- set titleCol = 12 -%}

        {%- if toolbar.filterForm is not null and toolbar.buttons is empty -%}
            {%- set titleCol = 6 -%}
            {%- set filterCol = 6 -%}
        {%- endif -%}

        {%- if toolbar.filterForm is null and toolbar.buttons is not empty -%}
            {%- set titleCol = 6 -%}
            {%- set buttonsCol = 6 -%}
        {%- endif -%}

        {%- if toolbar.filterForm is not null and toolbar.buttons is not empty -%}
            {%- set titleCol = 4 -%}
            {%- set filterCol = 4 -%}
            {%- set buttonsCol = 4 -%}
        {%- endif -%}

    {%- else -%}

        {%- if toolbar.filterForm is not null -%}
            {%- set filterCol = 12 -%}

            {%- if toolbar.buttons is not empty -%}
                {%- set filterCol = 6 -%}
                {%- set buttonsCol = 6 -%}
            {%- endif -%}

        {%- else -%}

            {%- set buttonsCol = 12 -%}

        {%- endif -%}

    {%- endif -%}
{%- endif -%}
{% if titleCol > 0 or filterCol > 0 or buttonsCol > 0 %}
<div id="toolbar" class="container-fluid">
    <div class="row">
        {% if toolbar.title is not empty %}
            <div class="col-md-{{ titleCol }}">
                <h1>{{ toolbar.title }}</h1>
                {% if toolbar.subtitle is not empty %}<small>{{ toolbar.subtitle|locale_date('%d/%m/%Y') }}</small>{% endif %}
            </div>
        {% endif %}
        {% if toolbar.filterForm is not null %}
            <div class="col-md-{{ filterCol }}">
                {% include "parts/filterform.twig" with {"form":toolbar.filterForm} only %}
            </div>
        {% endif %}
        {% if toolbar.buttons is not empty %}
            <div class="col-md-{{ buttonsCol }}">
                <div class="btn-toolbar text-right" role="toolbar" aria-label="Barre d'outils">
                    {% for button in toolbar.buttons %}
                        {{ button.render()|raw }}
                    {% endfor %}
                </div>
            </div>
        {% endif %}
    </div>
</div>
{'fraction_non_alphanumeric': 0.16799840191769877, 'fraction_numerical': 0.01278465840990811, 'mean_word_length': 1.565061475409836, 'pattern_counts': {'":': 2, '<': 33, '<?xml version=': 0, '>': 39, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1024612', 'n_tokens_mistral': 1752, 'n_tokens_neox': 1497, 'n_words': 411}