<table class="table table-bordered">
    <tbody>

    {foreach $recommandation->getProducts() as $key => $recommandationProduct}
        {assign var="product" value=$recommandationProduct->getProduct()}
        <tr class="hide-xs">
            <td>Aliment n°{$key +1}{if $recommandationProduct->months} (jusqu'à {$recommandationProduct->months - 1} mois){/if}
            </td>
            <td>
                <img class="img-fluid card-img-top"
                     src="{$link->getImageLink($product->link_rewrite, $recommandation->getRecoProductImageIdByIdProduct($product->id), 'home_default')|escape:'html':'UTF-8'}"
                     alt="{$product->name|escape:'html':'UTF-8'}"
                />
            </td>
            <td>{$product->name}</td>
            <td>Ration : {$recommandationProduct->quantity}g/jour</td>
            <td>
                <a href="{$link->getProductLink($product->id)}"
                   class="btn btn-primary"><span><i class="fas fa-file-alt right"></i> Fiche produit</span>
                </a>
            </td>
        </tr>
        <tr class="show-xs">
            <td>
                <div style="display: inline; vertical-align: middle">
                    <input
                            {if $recommandation->id_recommandation_product && $recommandation->id_recommandation_product != $recommandationProduct->id && !$recommandationProduct->isNextOf($recommandation->id_recommandation_product)}disabled="disabled"{/if}
                            {if $recommandation->id_recommandation_product == $recommandationProduct->id}checked=checked{/if}
                            type="radio" id="reco-{$recommandationProduct->id}-product" name="id_recommandation_product" value="{$recommandationProduct->id}">
                    <label class="show-xs" style="vertical-align: inherit"
                           for="reco-{$recommandationProduct->id}-product">Aliment
                        n°{$key + 1} {if $recommandationProduct->hasNext()} - jusqu'à {$recommandationProduct->months - 1} mois {else} - après {$recommandationProduct->months - 1} mois{/if}</label>
                </div>
                <div style="width: 100%">

                    <img style="margin: auto" class="replace-2x img-responsive"
                         src="{$link->getImageLink($product->link_rewrite, $animal->getRecoProductImageId($product->id), 'home_default')|escape:'html':'UTF-8'}"
                         alt="{if !empty($product->legend)}{$product->legend|escape:'html':'UTF-8'}{else}{$product->name|escape:'html':'UTF-8'}{/if}"
                         title="{if !empty($product->legend)}{$product->legend|escape:'html':'UTF-8'}{else}{$product->name|escape:'html':'UTF-8'}{/if}" {if isset($homeSize)} width="{$homeSize.width}" height="{$homeSize.height}"{/if}
                    />

                    <strong>{$product->name}</strong>

                    Ration : {$recommandationProduct->quantity}g/jour*
                    
                    <a href="{$link->getProductLink($product->id)}" class="btn btn-primary">
                                <span>
                                    <i class="fas fa-file-alt right"></i>
                                    Fiche produit
                                </span>
                    </a>
                </div>
            </td>
        </tr>
    {/foreach}
    </tbody>
</table>
