Subversion Repositories eFlore/Applications.cel

Rev

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

<!-- WIDGET:CEL:PHOTO - DEBUT -->
<div id="cel-photo-contenu<?=$id?>" class="cel-photo-contenu">
        <!-- Feuilles de styles -->
        <style type="text/css">
                #cel-photo-contenu<?=$id?>, #cel-galerie-photo<?=$id?>{
                        width:<?=(($colonne * 69))?>px;
                }
                #cel-galerie-photo<?=$id?> #cel-photo-extra<?=$id?> img{
                        width:<?=(($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"><?=$erreur;?></p>
                <?php endforeach; ?>
        <?php endif; ?>
        
        <?php if ($informations) : ?>
                <?php foreach ($informations as $information) : ?>
                        <p class="info"><?=$information;?></p>
                <?php endforeach; ?>
        <?php endif; ?>
<?php else : ?>
        <h1>
                <? if (!empty($titre)) : ?>
                        <?=$titre?>
                <? else : ?>
                        Dernières images du 
                        <a href="http://www.tela-botanica.org/appli:cel" title="Carnet en Ligne" onclick="window.open(this.href);return false;">
                                CEL
                        </a>
                <? endif; ?>
                <a href="<?=$flux_rss_url?>" 
                        class="cel-photo-flux<?=$id?>" 
                        title="Suivre les images" 
                        onclick="window.open(this.href);return false;">
                        <img src="http://www.tela-botanica.org/sites/commun/generique/images/rss.png" alt="Suivre les images" />
                </a>
        </h1>
        <div id="cel-galerie-photo<?=$id?>">
        <?php foreach ($items as $item) : ?>
                <div class="cel-photo">
                        <a href="<?=sprintf($item['url_tpl'], 'XL')?>" class="cel-img" title="<?=$item['titre']?> - Publiée le <?=$item['date']?> - GUID : <?=$item['guid']?>" rel="galerie-princ<?=$id?>">
                                <img src="<?=sprintf($item['url_tpl'], 'CRX2S')?>" alt="<?=$item['titre']?>"/>
                        </a>
                        <div id="cel-info-<?=$item['guid']?>" class="cel-infos">
                                <strong>
                                        <a class="cel-img-titre" href="<?=$item['eflore_url']?>"
                                                onclick="window.open(this.href);return false;"  
                                                title="Cliquez pour accéder à la fiche eFlore">
                                                <?=$item['titre']?>
                                        </a>
                                </strong><br />
                                <span class="cel-img-date">Publiée le <?=$item['date']?></span>
                        </div>
                </div>
        <?php endforeach; ?>
        <?php if ($extra_actif) : ?>
                <div id="cel-photo-extra<?=$id?>" class="cel-photo cel-photo-extra">
                        <a href="<?=sprintf($extra['url_tpl'], 'XL')?>" class="cel-img" title="<?=$extra['titre']?> - Publiée le <?=$extra['date']?> - GUID : <?=$extra['guid']?>" rel="galerie-princ<?=$id?>">
                                <img src="<?=sprintf($extra['url_tpl'], 'CRS')?>" alt="<?=$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/appli:cel" title="Carnet en Ligne" onclick="window.open(this.href);return false;">
                                CEL
                        </a>
                </span>
                <span class="cel-photo-date-generation">Au <?=strftime('%A %d %B %Y à %H:%M:%S')?></span>
         </p>
        <script type="text/Javascript">
                //<![CDATA[
                
                        
                $(document).ready(function() {
                        $('a.cel-img').attr('rel', 'galerie-princ<?=$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;
                                }
                        });
                });
                //]]>
        </script>
<?php endif; ?>
</div>
<!-- WIDGET:CEL:PHOTO - FIN -->