Subversion Repositories eFlore/Applications.cel

Rev

Rev 2993 | Go to most recent revision | Blame | Last modification | View Log | RSS feed

<!-- WIDGET:CEL:PHOTO - DEBUT -->
<div id="cel-photo-contenu<?php echo $id;?>" class="cel-photo-contenu">
        <!-- Feuilles de styles -->
        <style type="text/css">
                #cel-photo-contenu<?php echo $id;?>, #cel-galerie-photo<?php echo $id;?>{
                        width:<?php echo (($colonne * 69));?>px;
                }
                #cel-galerie-photo<?php echo $id;?> #cel-photo-extra<?php echo $id;?> img{
                        width:<?php echo (($colonne * 69)-6);?>px;
                }
        </style>

<?php if (isset($erreurs) || isset($informations)) : ?>
        <h1>Erreur &amp; informations</h1>
        <p>Impossible d'afficher le flux.</p>
        <!-- Affichage des erreurs et messages d'information : -->
        <?php if ($erreurs) : ?>
                <?php foreach ($erreurs as $erreur) : ?>
                        <p class="erreur"><?php echo $erreur;?></p>
                <?php endforeach;?>
        <?php endif;?>

        <?php if ($informations) : ?>
                <?php foreach ($informations as $information) : ?>
                        <p class="info"><?php echo $information;?></p>
                <?php endforeach;?>
        <?php endif;?>
<?php else : ?>
        <h1>
                <?php if (!empty($titre)) : ?>
                        <?php echo $titre;?>
                <?php endif;?>
                <?php if ($icone_rss) : ?>
                <a href="<?php echo $flux_rss_url;?>"
                        class="cel-photo-flux"
                        title="Suivre les images"
                        onclick="window.open(this.href);return false;">
                        <img src="https://www.tela-botanica.org/sites/commun/generique/images/rss.png" alt="Suivre les images" />
                </a>
                <? endif;?>
        </h1>
        <div id="cel-galerie-photo<?php echo $id;?>">
        <?php foreach ($items as $item) : ?>
                <div class="cel-photo">
                        <a href="<?php echo sprintf($item['url_tpl'], 'XL');?>" class="cel-img" title="<?php echo $item['titre'];?> - Publiée le <?php echo $item['date'];?> - GUID : <?php echo $item['guid'];?>" rel="galerie-princ<?php echo $id;?>">
                                <img src="<?php echo sprintf($item['url_tpl'], 'CRX2S');?>" alt="<?php echo $item['titre'];?>"/>
                        </a>
                        <div id="cel-info-<?php echo $item['guid'];?>" class="cel-infos">
                                <strong>
                                        <?php if ($item['eflore_url'] != '#' && $item['eflore_url'] != '') : ?>
                                                <a class="cel-img-titre" href="<?php echo $item['eflore_url'];?>"
                                                        onclick="window.open(this.href);return false;"
                                                        title="Cliquez pour accéder à la fiche eFlore">
                                                        <?php echo $item['infos']['nom_sci'];?>
                                                </a> par
                                                <a class="cel-img-contact"
                                                        href="<?php echo $url_widget;?>?mode=contact&nn=<?php echo urlencode($item['infos']['nn']);?>&nom_sci=<?php echo urlencode($item['infos']['nom_sci']);?>&date=<?php echo urlencode($item['infos']['date']);?>&id_image=<?php echo  $item['guid'];?>"
                                                        title="Cliquez pour contacter l'auteur de la photo">
                                                        <?php echo $item['infos']['auteur'];?>
                                                </a>
                                                <?php if (! empty($item['infos']['localite'])) : ?>
                                                        à <?php echo $item['infos']['localite'];?>
                                                <?php endif;?>
                                                        le <?php echo $item['infos']['date'];?>
                                                <?php else : ?>
                                                        <?php echo $item['titre'];?>
                                        <?php endif;?>
                                </strong><br>
                                <span class="cel-img-date">Publiée le <?php echo $item['date'];?></span>
                        </div>
                </div>
        <?php endforeach;?>
        <?php if ($extra_actif) : ?>
                <div id="cel-photo-extra<?php echo $id;?>" class="cel-photo cel-photo-extra">
                        <a href="<?php echo sprintf($extra['url_tpl'], 'XL');?>" class="cel-img" title="<?php echo $extra['titre'];?> - Publiée le <?php echo $extra['date'];?> - GUID : <?php echo $extra['guid'];?>" rel="galerie-princ<?php echo $id;?>">
                                <img src="<?php echo sprintf($extra['url_tpl'], 'CRS');?>" alt="<?php echo $extra['titre'];?>"/>
                        </a>
                </div>
        </div>
        <?php endif;?>
        <p class="cel-photo-pieds discretion nettoyage">
                <span class="cel-photo-source">
                        Source : 
                        <a href="http://www.tela-botanica.org/page:cel" title="Carnet en Ligne" onclick="window.open(this.href);return false;">
                                CEL
                        </a>
                </span>
                <span class="cel-photo-date-generation">Au <?php echo strftime('%A %d %B %Y à %H:%M:%S');?></span>
         </p>
        <script type="text/Javascript">
                //<![CDATA[
                var utiliseFancybox = "<?php echo $utilise_fancybox;?>";
                if(utiliseFancybox) {
                        $(document).ready(function() {
                                $('a.cel-img').attr('rel', "galerie-princ<?php echo $id;?>").fancybox({
                                        transitionIn:'elastic',
                                        transitionOut:'elastic',
                                        speedIn :600,
                                        speedOut:200,
                                        overlayShow:true,
                                        titleShow:true,
                                        titlePosition:'inside',
                                        titleFormat:function (titre, currentArray, currentIndex, currentOpts) {
                                                var motif = /GUID : ([0-9]+)$/;
                                                motif.exec(titre);
                                                var guid = RegExp.$1;
                                                var info = $('#cel-info-'+guid).clone().html();
                                                var tpl =
                                                        '<div class="cel-legende">'+
                                                        '<p class="cel-legende-vei">'+'Image n°' + (currentIndex + 1) + ' sur ' + currentArray.length +'<\/p>'+
                                                        (titre && titre.length ? '<p>'+info+'<\/p>' : '' )+
                                                        '<\/div>';
                                                return tpl;
                                        }
                                });
                        });
                } else {
                        $('a.cel-img').click(function(event) {
                                ouvrirFenetrePopup($(this));
                                event.preventDefault();
                        });
                }

                $(document).ready(function() {
                        $('a.cel-img-contact').live('click', function(event) {
                                event.preventDefault();
                                ouvrirFenetreContact($(this));
                        });
                });

                function ouvrirFenetrePopup(lienImage) {
                        var url = "?mode=popup&url_image="+lienImage.attr('href')+'&galerie_id=<?php echo $galerie_id;?>';
                        window.open(url, '', 'directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no, width='+(700)+', height='+(650));
                }


                function ouvrirFenetreContact(lienImage) {
                        var url = lienImage.attr("href");
                        window.open(url, '_blank', 'directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no, width='+(400)+', height='+(550));
                }
                //]]>
        </script>
<?php endif;?>
</div>
<!-- WIDGET:CEL:PHOTO - FIN -->