<?php
if (count($fiches) > 0) : ?>
    <?php echo $info_res; ?>
    <ul class="BAZ_liste <?php echo $params['class']; ?>">
        <?php
        foreach ($fiches as $fiche): ?>
            <li class="bazar-entry" <?php echo $fiche['html_data']; ?>>
                <a href="<?php echo $fiche['url']; ?>"
                    <?php if (isset($params['links_in_new_window'])
                            && filter_var($params['links_in_new_window'], FILTER_VALIDATE_BOOLEAN)) {
                        echo 'target="_blank"';
                    } ?>>
                    <?php
                    $style = '';
                    $color = getCustomValueForEntry(
                        $params['color'],
                        $params['colorfield'],
                        $fiche,
                        ''
                    );
                    if (!empty($color)) {
                        echo '<span class="pellet" style="background-color:' . $color . ';"></span> ';
                    }
                    $icon = getCustomValueForEntry(
                        $params['icon'],
                        $params['iconfield'],
                        $fiche,
                        ''
                    );
                    if (!empty($icon)) {
                        echo '<i class="' . $icon . '"></i> ';
                    }

                    echo '<span class="entry-title">' . $fiche['bf_titre'] . '</span>';
                    ?>
                </a>
            </li>
        <?php
        endforeach; ?>
    </ul>
    <?php echo $pager_links; ?>
<?php endif; ?>
