Subversion Repositories eFlore/Applications.cel

Rev

Rev 687 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
587 jpm 1
<!-- WIDGET:CEL:PHOTO - DEBUT -->
879 jpm 2
<div id="cel-photo-contenu<?=$id?>" class="cel-photo-contenu">
587 jpm 3
	<!-- Feuilles de styles -->
4
	<style type="text/css">
879 jpm 5
		#cel-photo-contenu<?=$id?>, #cel-galerie-photo<?=$id?>{
587 jpm 6
			width:<?=(($colonne * 69))?>px;
7
		}
879 jpm 8
		#cel-galerie-photo<?=$id?> #cel-photo-extra<?=$id?> img{
587 jpm 9
			width:<?=(($colonne * 69)-6)?>px;
10
		}
11
	</style>
879 jpm 12
 
587 jpm 13
<?php if (isset($erreurs) || isset($informations)) : ?>
14
	<h1>Erreur &amp; informations</h1>
15
	<p>Impossible d'afficher le flux.</p>
16
	<!-- Affichage des erreurs et messages d'information : -->
17
	<?php if ($erreurs) : ?>
18
		<?php foreach ($erreurs as $erreur) : ?>
19
			<p class="erreur"><?=$erreur;?></p>
20
		<?php endforeach; ?>
21
	<?php endif; ?>
22
 
23
	<?php if ($informations) : ?>
24
		<?php foreach ($informations as $information) : ?>
25
			<p class="info"><?=$information;?></p>
26
		<?php endforeach; ?>
27
	<?php endif; ?>
28
<?php else : ?>
29
 	<h1>
879 jpm 30
 		<? if (!empty($titre)) : ?>
31
 			<?=$titre?>
32
 		<? else : ?>
33
	 		Dernières images du
34
	 		<a href="http://www.tela-botanica.org/appli:cel" title="Carnet en Ligne" onclick="window.open(this.href);return false;">
35
	 			CEL
36
	 		</a>
37
 		<? endif; ?>
587 jpm 38
 		<a href="<?=$flux_rss_url?>"
879 jpm 39
			class="cel-photo-flux<?=$id?>"
587 jpm 40
			title="Suivre les images"
41
			onclick="window.open(this.href);return false;">
42
			<img src="http://www.tela-botanica.org/sites/commun/generique/images/rss.png" alt="Suivre les images" />
43
		</a>
44
 	</h1>
879 jpm 45
	<div id="cel-galerie-photo<?=$id?>">
587 jpm 46
	<?php foreach ($items as $item) : ?>
47
		<div class="cel-photo">
879 jpm 48
			<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?>">
686 jpm 49
				<img src="<?=sprintf($item['url_tpl'], 'CRX2S')?>" alt="<?=$item['titre']?>"/>
587 jpm 50
			</a>
51
			<div id="cel-info-<?=$item['guid']?>" class="cel-infos">
52
				<strong>
53
					<a class="cel-img-titre" href="<?=$item['eflore_url']?>"
54
						onclick="window.open(this.href);return false;"
55
						title="Cliquez pour accéder à la fiche eFlore">
56
						<?=$item['titre']?>
57
					</a>
58
				</strong><br />
59
				<span class="cel-img-date">Publiée le <?=$item['date']?></span>
60
 			</div>
61
		</div>
62
	<?php endforeach; ?>
63
	<?php if ($extra_actif) : ?>
879 jpm 64
		<div id="cel-photo-extra<?=$id?>" class="cel-photo cel-photo-extra">
65
			<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?>">
686 jpm 66
				<img src="<?=sprintf($extra['url_tpl'], 'CRS')?>" alt="<?=$extra['titre']?>"/>
587 jpm 67
			</a>
68
		</div>
69
	</div>
70
	<?php endif ?>
879 jpm 71
	<p class="cel-photo-pieds discretion nettoyage">
72
		<span class="cel-photo-source">
73
			Source :
74
			<a href="http://www.tela-botanica.org/appli:cel" title="Carnet en Ligne" onclick="window.open(this.href);return false;">
75
		 		CEL
76
		 	</a>
77
	 	</span>
78
	 	<span class="cel-photo-date-generation">Au <?=strftime('%A %d %B %Y à %H:%M:%S')?></span>
79
	 </p>
587 jpm 80
	<script type="text/Javascript">
81
		//<![CDATA[
879 jpm 82
 
587 jpm 83
 
84
		$(document).ready(function() {
879 jpm 85
			$('a.cel-img').attr('rel', 'galerie-princ<?=$id?>').fancybox({
587 jpm 86
				transitionIn:'elastic',
87
				transitionOut:'elastic',
88
				speedIn	:600,
89
				speedOut:200,
90
				overlayShow:true,
91
				titleShow:true,
92
				titlePosition:'inside',
879 jpm 93
				titleFormat:function (titre, currentArray, currentIndex, currentOpts) {
94
					var motif = /GUID : ([0-9]+)$/;
95
					motif.exec(titre);
96
					var guid = RegExp.$1;
97
					var info = $('#cel-info-'+guid).clone().html();
98
					var tpl =
99
						'<div class="cel-legende">'+
100
						'<p class="cel-legende-vei">'+'Image n°' + (currentIndex + 1) + ' sur ' + currentArray.length +'<\/p>'+
101
						(titre && titre.length ? '<p>'+info+'<\/p>' : '' )+
102
						'<\/div>';
103
					return tpl;
104
				}
587 jpm 105
			});
106
		});
107
		//]]>
108
	</script>
109
<?php endif; ?>
110
</div>
111
<!-- WIDGET:CEL:PHOTO - FIN -->