{% extends 'layout.twig' %}

{% block body %}

	<div class="contenu clearfix"  id="fournisseurs">
	<h1>
    	{{ 'Fournisseurs' | trad }}
    </h1>
    
    {{ ariane() }}
    
    <div class="tab-content">
        <div id="detail_fournisseur" class="clearfix">
            <h2>
                {{ 'Fournisseur' | trad }} : {{ libelle_fournisseur??libelle }} ({{ code_fournisseur??id }})
            	<button class='button principal ouvert' type='button' id='openAll' onClick='openAll();'>{{ 'Ouvrir tout' | trad }}</button>
            </h2>
            
            {{ arianeSub() }}
            
				<div class="tab-content">
					<div id="resultat" class="tab-pane fade in active clearfix padding15">
						<div class="row">
                        	<div class="panel panel-default">
                            	<div class="panel-body">
                              		<div class="slide-container">
                                		<div class="list-group" id="mg-multisidetabs">
                                            {{ buildResultatEval(liste_pere) }}
                                		</div><!-- ./ end list-group -->
                              		</div><!-- ./ end slide-container -->
                            	</div><!-- ./ end panel-body -->
                          	</div><!-- ./ end panel panel-default-->
                       
                      	</div><!-- ./ end row -->
            		</div><!-- ./ end resultat -->
				</div><!-- ./ end tab-content -->
		</div>
	</div>
<script>
	function openAll()
	{
		if ( $( "#openAll" ).is( ".ouvert" ) ){
    		$('.list-sub').show();
    		$('.list-sub').addClass('mg-show');
    		$('#openAll').html('{{ "Fermer tout" | trad }}');
    		$('#openAll').removeClass('ouvert');
    		$('#openAll').addClass('fermer');
		}
		else
		{
    		$('.list-sub').hide();
    		$('.list-sub').removeClass('mg-show');
    		$('#openAll').html('{{ "Ouvrir tout" | trad }}');
    		$('#openAll').removeClass('fermer');
    		$('#openAll').addClass('ouvert');
		}
	}
</script>
{% endblock %}