<?php 
$im=new thumbnail_tool(CHEMIN,CACHE_VIGNETTES,APP."images/");
$im->set_source(IMPORTS_URL.$item->getFile('illustration'));
$de=$item->getDescription('illustration');
?>
<div id="fw" class="px-3 pt-0">
    <div id="fw-visual">
        <div id="fw-image">
            <img src="<?= $im->vignette(FULLSIZE_W,FULLSIZE_H,false); ?>" alt="<?= $de ?>">
            <div class="fw-nav fw-prev" onclick="yc_vieweshowimage(-1)"></div>
            <div class="fw-nav fw-next" onclick="yc_vieweshowimage(1)"></div>
            <div class="fw-description ff-bold-secondary fs-small"><?php
    if($de){
        echo "<span>".$de."</span>";
    }
                ?></div>
        </div>
    </div>
    <div id="fw-infos" class="p-3">
        <img onclick="yc_vieweshowclickimage(this)" class="img-object-fit aspectratio-1 mb-2" data-slideshow data-slideshowsrc="<?= $im->vignette(FULLSIZE_W,FULLSIZE_H,false) ?>" src="<?= $im->vignette(VIGNETTE_W,VIGNETTE_H,false) ?>" title="<?= $item->getDescription('illustration') ?>">

        <h2 class="mt-4 fs-big"><?= $item->get("prenom") ?> <?= $item->get("nom") ?>
        
        <?php
    if($item->get("usuel",false)){
        echo "<br>( ".$item->get("usuel")." )";
        
    }
    ?>
        </h2>
        <div class="fs-medium mt-4">
            <?php
    if($item->get("option",false)){
        echo "<div class='fs-medium ff-bold-primary'>".$item->getpropre("option")."</div>";
    }

             if($item->get("pole",false)){
                 echo "<div class='fs-medium ff-bold-primary'>".$item->getpropre("pole")."</div>";
             }

            ?>

        </div>
        <?php
        $liste=$item->getFilledValues();
        unset($liste['illustration']);
        unset($liste['prenom']);    
        unset($liste['nom']);    
        unset($liste['usuel']);    
        unset($liste['pole']);    
        unset($liste['option']);    
        foreach($liste as $id => $val){
            if($item->getParam($id,"snippet")){
                $snippet=getSnippetFile("display_".$item->getParam($id,"snippet").".php");
                include($snippet);
            } else {
                // voir s'il existe un snippet spécifique
                $type=$item->getParam($id,"type");
                $snippet=getSnippetFile("display_part_".$type.".php");
                if(!file_exists($snippet)){
                    $snippet=getSnippetFile("display_part_default.php");
                } 
                include($snippet);
            }
        }
        foreach(MODULES['insert_item'] as $insert){
            include(CHEMIN.$insert);
        }
        ?>
    </div>
</div>