
    <div id="divCatalogue" class="box-form collapse {% if parametrage.cata_ouvert =='O' %}in{% endif %}">
        <input id="findInCatalogue" placeholder="{{ 'Recherche d\'un ou plusieurs catalogues dans la liste' | trad }}" style="margin-bottom:10px;" class="form-control form-control-sm" type="text">
        <div id="listeCatalogue">
            {% for catalogue in listeCatalogue %}
                <div class="catalogue" >
                    <div class="divLeft">
                        <span id="favCat{{ catalogue.ID_CATPR }}" class="favCat {% if catalogue.CODE_USER %}artFav{% else %}artNoFav{% endif %}"  onClick="addCatFavoris('{{catalogue.ID_CATPR}}','{{ path('RechercheArticles.RechercheArticles.catalogueFavoris', {'idCatalogue':catalogue.ID_CATPR}) }}')"></span>
                        <input type="checkbox" id="catalogue{{ catalogue.ID_CATPR }}" name="catalogue{{ catalogue.ID_CATPR }}" {% if post['catalogue'~catalogue.ID_CATPR]%} checked {% endif %} class="form-control checkbox checkCatalogue"/>
                    </div>
                    <img class="imgCat" 
                        src="{% if catalogue.IMG %}{{ catalogue.IMG }}{% else %}{{ baseUrl('IconeV2/Global/Default-catalog-img.svg') }}{% endif %}"
                        onerror="this.onerror=null; this.src='{{ baseUrl('IconeV2/Global/Default-catalog-img.svg') }}'"
                    >
                    {% if catalogue.PDF_URL %}
                        <a href="{{ catalogue.PDF_URL }}" target="_blank"><span class="pdf"></span></a>
                    {% endif %}
                    <div class="divRight">
                        <div class="titre" style="cursor:pointer;"  
                            {% if catalogue.punchOut %}
                                onClick="generatePunchOut('{{ catalogue.punchOut }}');"
                            {% else %}
                                onClick="$('#catalogue{{ catalogue.ID_CATPR }}').prop( 'checked', true );$('#filter_recherche').submit();"
                            {% endif %}
                        >
                            {{ catalogue.NCATAPR }}
                        </div>
                        <div class="titreComplet">{{ shortLibelle(catalogue.DESCRCATA, 35, 'top', false, false) }}</div>
                    </div>
                    
                </div>
            {% endfor %}
        </div>
        <script>
            $("#findInCatalogue").on("keyup", function() {
                var value = $(this).val().toLowerCase();
                $("#listeCatalogue .catalogue").filter(function() {
                    $(this).toggle($(this).text().toLowerCase().indexOf(value) > -1)
                });
            });

            $('.checkCatalogue').click(function(){
                checkedCatalogue();
            });

            $( document ).ready(function() {
                checkedCatalogue();
            });

        </script>
    </div>
