<article class="item p-1" data-source="<?= $item->filename ?>" onclick="yc_clicItem(this)" data-id="<?= isset($num) ? sprintf("%'.06d", $num) : 100000 ?>" data-date="<?= $item->get('date_creation',date('Y-m-d')) ?>">
    <div class="item-header"> 
        <img src="app/images/defaut.jpg" data-source="<?php
    $im=new thumbnail_tool(CHEMIN,CACHE_VIGNETTES,APP."images/");
         $im->set_source(IMPORTS.$item->getFile('illustration'));
         echo $im->vignette(VIGNETTE_W,VIGNETTE_H,false);

                                                      ?>" class="item-illu img-object-fit aspectratio-1">

    </div>
    <div class="item-infos mt-1">
        <h2 class="fs-small ff-bold-primary mb-1">

           <?php
    if($item->get("usuel",false)){        
        echo "<span data-contenu='usuel'>".$item->get("usuel")."</span> ";
        echo " (<span data-contenu='prenom'>".$item->get('prenom')."</span>)";
    } else {
        echo "<span data-contenu='prenom' >".$item->get('prenom')."</span>";
    }
            ?>

            <span data-contenu='nom' ><?= $item->get('nom') ?></span></h2>

        <?php
    if($item->get("option")){
        echo "<div class='fs-small ff-bold-secondary' data-contenu='option'>".$item->getpropre("option")."</div>";
    }

                if($item->get("pole")){
                    echo "<div class='fs-small ff-bold-secondary' data-contenu='pole'>".$item->getpropre("pole")."</div>";
                }
        ?>

        <?php
        $liste=$item->getFilledValues();
        unset($liste['illustration']);
        unset($liste['prenom']);
        unset($liste['nom']);
        unset($liste['usuel']);
        unset($liste['option']);
        unset($liste['pole']);
        foreach($liste as $cle=>$valeur){
            if($item->getParam($cle,"mosaic_display",false)){
                echo "<div class=\"item-info item-$cle fs-small\" data-contenu='$cle'>".$item->getPropre($cle)."</div>\n";
            }
        }
        ?>
    </div>
</article> 