<head>
{foreach from=$cssFiles item=file}
    <link href="{$file}" rel="stylesheet" media="all">
{/foreach}
</head>
{assign var=repeatLegume value=$infos.paniers_types|@count==2}
<body class="print" orientation="{$orientation}">
    <!-- LEGUMES -->
    <div class="formLivraison">
        <table class="printHeader">
            <tr>
                <th class="titre">
                    LIVRAISON {$infos.paniers_groupe_nom|upper}<br/>
                    {$infos.date_long_print}
                </th>
                <th class="page">FEUILLE DE DISTRIBUTION</th>
                <th class="logo"><img src="{$logo}"></th>
            </tr>
        </table>
        <table class="distrib">
            <thead>
                <tr>
                    {foreach from=$infos.paniers_types item=p name=types}
                    {if ($repeatLegume && !$smarty.foreach.types.first && $infos.paniers_types|@count>1) 
                     || (!$repeatLegume && $smarty.foreach.types.first) }
                    <th class="legume"></th>{/if}
                    <th class="panier">{$p.type_nom|upper}</th>
                    {/foreach}
                </tr>
            </thead>
            <tbody>
            {foreach from=$infos.legumes_distrib item=l name=legumes}
                <tr>
                {foreach from=$infos.paniers_types item=p name=types}
                    {if ($repeatLegume && !$smarty.foreach.types.first && $infos.paniers_types|@count>1) 
                     || (!$repeatLegume && $smarty.foreach.types.first) }
                    <td class="legume">{$l.nom|upper}</td>{/if}
                    <td class="quantite">{if $l.paniers[$p.type_ref].quantite>0}{$l.paniers[$p.type_ref].quantite_print}{else}/{/if}</td>
                {/foreach}
                </tr>
            {/foreach}
            </tbody>
        </table>
    </div>
</body>