Subversion Repositories eFlore/Applications.cel

Rev

Rev 2993 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2993 Rev 3630
Line 1... Line 1...
1
<!-- WIDGET:CEL:PHOTO - DEBUT -->
1
<!-- WIDGET:CEL:PHOTO - DEBUT -->
2
<div id="cel-photo-contenu<?=$id?>" class="cel-photo-contenu">
2
<div id="cel-photo-contenu<?php echo $id;?>" class="cel-photo-contenu">
3
	<!-- Feuilles de styles -->
3
	<!-- Feuilles de styles -->
4
	<style type="text/css">
4
	<style type="text/css">
5
		#cel-photo-contenu<?=$id?>, #cel-galerie-photo<?=$id?>{
5
		#cel-photo-contenu<?php echo $id;?>, #cel-galerie-photo<?php echo $id;?>{
6
			width:<?=(($colonne * 69))?>px;
6
			width:<?php echo (($colonne * 69));?>px;
7
		}
7
		}
8
		#cel-galerie-photo<?=$id?> #cel-photo-extra<?=$id?> img{
8
		#cel-galerie-photo<?php echo $id;?> #cel-photo-extra<?php echo $id;?> img{
9
			width:<?=(($colonne * 69)-6)?>px;
9
			width:<?php echo (($colonne * 69)-6);?>px;
10
		}
10
		}
11
	</style>
11
	</style>
12
	
12
 
13
<?php if (isset($erreurs) || isset($informations)) : ?>
13
<?php if (isset($erreurs) || isset($informations)) : ?>
14
	<h1>Erreur &amp; informations</h1>
14
	<h1>Erreur &amp; informations</h1>
15
	<p>Impossible d'afficher le flux.</p>
15
	<p>Impossible d'afficher le flux.</p>
16
	<!-- Affichage des erreurs et messages d'information : -->
16
	<!-- Affichage des erreurs et messages d'information : -->
17
	<?php if ($erreurs) : ?>
17
	<?php if ($erreurs) : ?>
18
		<?php foreach ($erreurs as $erreur) : ?>
18
		<?php foreach ($erreurs as $erreur) : ?>
19
			<p class="erreur"><?=$erreur;?></p>
19
			<p class="erreur"><?php echo $erreur;?></p>
20
		<?php endforeach; ?>
20
		<?php endforeach;?>
21
	<?php endif; ?>
21
	<?php endif;?>
22
	
22
 
23
	<?php if ($informations) : ?>
23
	<?php if ($informations) : ?>
24
		<?php foreach ($informations as $information) : ?>
24
		<?php foreach ($informations as $information) : ?>
25
			<p class="info"><?=$information;?></p>
25
			<p class="info"><?php echo $information;?></p>
26
		<?php endforeach; ?>
26
		<?php endforeach;?>
27
	<?php endif; ?>
27
	<?php endif;?>
28
<?php else : ?>
28
<?php else : ?>
29
 	<h1>
29
 	<h1>
30
 		<? if (!empty($titre)) : ?>
30
 		<?php if (!empty($titre)) : ?>
31
 			<?=$titre?>
31
 			<?php echo $titre;?>
32
 		<? endif ; ?>
32
 		<?php endif;?>
33
 		<? if($icone_rss) : ?>
33
 		<?php if ($icone_rss) : ?>
34
 		<a href="<?=$flux_rss_url?>" 
34
 		<a href="<?php echo $flux_rss_url;?>"
35
			class="cel-photo-flux" 
35
			class="cel-photo-flux"
36
			title="Suivre les images" 
36
			title="Suivre les images"
37
			onclick="window.open(this.href);return false;">
37
			onclick="window.open(this.href);return false;">
38
			<img src="https://www.tela-botanica.org/sites/commun/generique/images/rss.png" alt="Suivre les images" />
38
			<img src="https://www.tela-botanica.org/sites/commun/generique/images/rss.png" alt="Suivre les images" />
39
		</a>
39
		</a>
40
		<? endif; ?>
40
		<? endif;?>
41
 	</h1>
41
 	</h1>
42
	<div id="cel-galerie-photo<?=$id?>">
42
	<div id="cel-galerie-photo<?php echo $id;?>">
43
	<?php foreach ($items as $item) : ?>
43
	<?php foreach ($items as $item) : ?>
44
		<div class="cel-photo">
44
		<div class="cel-photo">
45
			<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?>">
45
			<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;?>">
46
				<img src="<?=sprintf($item['url_tpl'], 'CRX2S')?>" alt="<?=$item['titre']?>"/>
46
				<img src="<?php echo sprintf($item['url_tpl'], 'CRX2S');?>" alt="<?php echo $item['titre'];?>"/>
47
			</a>
47
			</a>
48
			<div id="cel-info-<?=$item['guid']?>" class="cel-infos">
48
			<div id="cel-info-<?php echo $item['guid'];?>" class="cel-infos">
49
				<strong>
49
				<strong>
50
					<?php if ($item['eflore_url'] != '#' && $item['eflore_url'] != '') { ?>
50
					<?php if ($item['eflore_url'] != '#' && $item['eflore_url'] != '') : ?>
51
					<a class="cel-img-titre" href="<?=$item['eflore_url']?>"
51
						<a class="cel-img-titre" href="<?php echo $item['eflore_url'];?>"
52
						onclick="window.open(this.href);return false;"  
52
							onclick="window.open(this.href);return false;"
53
						title="Cliquez pour accéder à la fiche eFlore">
53
							title="Cliquez pour accéder à la fiche eFlore">
54
						<?=$item['infos']['nom_sci']?>
54
							<?php echo $item['infos']['nom_sci'];?>
55
					</a> par 
55
						</a> par
56
					<a class="cel-img-contact" 
56
						<a class="cel-img-contact"
57
						href="<?= $url_widget ?>?mode=contact&nn=<?= urlencode($item['infos']['nn']) ;?>&nom_sci=<?= urlencode($item['infos']['nom_sci']) ;?>&date=<?= urlencode($item['infos']['date']) ;?>&id_image=<?= $item['guid']; ?>" 
57
							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'];?>"
58
						title="Cliquez pour contacter l'auteur de la photo">
58
							title="Cliquez pour contacter l'auteur de la photo">
59
						<?=$item['infos']['auteur']?>
59
							<?php echo $item['infos']['auteur'];?>
60
					</a>
60
						</a>
61
					<?php if (! empty($item['infos']['localite'])): ?>
61
						<?php if (! empty($item['infos']['localite'])) : ?>
62
						à <?= $item['infos']['localite'] ?>
62
							à <?php echo $item['infos']['localite'];?>
63
					<?php endif; ?>
63
						<?php endif;?>
64
					le <?=$item['infos']['date']?> 
64
							le <?php echo $item['infos']['date'];?>
65
					<?php } else { ?>
65
						<?php else : ?>
66
						<?=$item['titre']?>
66
							<?php echo $item['titre'];?>
67
					<?php } ?>
67
					<?php endif;?>
68
				</strong><br />
68
				</strong><br>
69
				<span class="cel-img-date">Publiée le <?=$item['date']?></span>
69
				<span class="cel-img-date">Publiée le <?php echo $item['date'];?></span>
70
 			</div>
70
 			</div>
71
		</div>
71
		</div>
72
	<?php endforeach; ?>
72
	<?php endforeach;?>
73
	<?php if ($extra_actif) : ?>
73
	<?php if ($extra_actif) : ?>
74
		<div id="cel-photo-extra<?=$id?>" class="cel-photo cel-photo-extra">
74
		<div id="cel-photo-extra<?php echo $id;?>" class="cel-photo cel-photo-extra">
75
			<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?>">
75
			<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;?>">
76
				<img src="<?=sprintf($extra['url_tpl'], 'CRS')?>" alt="<?=$extra['titre']?>"/>
76
				<img src="<?php echo sprintf($extra['url_tpl'], 'CRS');?>" alt="<?php echo $extra['titre'];?>"/>
77
			</a>
77
			</a>
78
		</div>
78
		</div>
79
	</div>
79
	</div>
80
	<?php endif ?>
80
	<?php endif;?>
81
	<p class="cel-photo-pieds discretion nettoyage">
81
	<p class="cel-photo-pieds discretion nettoyage">
82
		<span class="cel-photo-source">
82
		<span class="cel-photo-source">
83
			Source : 
83
			Source : 
84
			<a href="http://www.tela-botanica.org/page:cel" title="Carnet en Ligne" onclick="window.open(this.href);return false;">
84
			<a href="http://www.tela-botanica.org/page:cel" title="Carnet en Ligne" onclick="window.open(this.href);return false;">
85
		 		CEL
85
		 		CEL
86
		 	</a>
86
		 	</a>
87
	 	</span>
87
	 	</span>
88
	 	<span class="cel-photo-date-generation">Au <?=strftime('%A %d %B %Y à %H:%M:%S')?></span>
88
	 	<span class="cel-photo-date-generation">Au <?php echo strftime('%A %d %B %Y à %H:%M:%S');?></span>
89
	 </p>
89
	 </p>
90
	<script type="text/Javascript">
90
	<script type="text/Javascript">
91
		//<![CDATA[
91
		//<![CDATA[
92
		var utiliseFancybox = "<?= $utilise_fancybox; ?>";   
92
		var utiliseFancybox = "<?php echo $utilise_fancybox;?>";
93
		if(utiliseFancybox) {	
93
		if(utiliseFancybox) {
94
			$(document).ready(function() {
94
			$(document).ready(function() {
95
				$('a.cel-img').attr('rel', 'galerie-princ<?=$id?>').fancybox({
95
				$('a.cel-img').attr('rel', "galerie-princ<?php echo $id;?>").fancybox({
96
					transitionIn:'elastic',
96
					transitionIn:'elastic',
97
					transitionOut:'elastic',
97
					transitionOut:'elastic',
98
					speedIn	:600, 
98
					speedIn	:600,
99
					speedOut:200,
99
					speedOut:200,
100
					overlayShow:true,
100
					overlayShow:true,
101
					titleShow:true,
101
					titleShow:true,
102
					titlePosition:'inside',
102
					titlePosition:'inside',
103
					titleFormat:function (titre, currentArray, currentIndex, currentOpts) {
103
					titleFormat:function (titre, currentArray, currentIndex, currentOpts) {
104
						var motif = /GUID : ([0-9]+)$/;
104
						var motif = /GUID : ([0-9]+)$/;
105
						motif.exec(titre);
105
						motif.exec(titre);
106
						var guid = RegExp.$1;
106
						var guid = RegExp.$1;
107
						var info = $('#cel-info-'+guid).clone().html();
107
						var info = $('#cel-info-'+guid).clone().html();
108
						var tpl = 
108
						var tpl =
109
							'<div class="cel-legende">'+
109
							'<div class="cel-legende">'+
110
							'<p class="cel-legende-vei">'+'Image n°' + (currentIndex + 1) + ' sur ' + currentArray.length +'<\/p>'+	
110
							'<p class="cel-legende-vei">'+'Image n°' + (currentIndex + 1) + ' sur ' + currentArray.length +'<\/p>'+
111
							(titre && titre.length ? '<p>'+info+'<\/p>' : '' )+
111
							(titre && titre.length ? '<p>'+info+'<\/p>' : '' )+
112
							'<\/div>';
112
							'<\/div>';
113
						return tpl;
113
						return tpl;
114
					}
114
					}
115
				});
115
				});
Line 118... Line 118...
118
			$('a.cel-img').click(function(event) {
118
			$('a.cel-img').click(function(event) {
119
				ouvrirFenetrePopup($(this));
119
				ouvrirFenetrePopup($(this));
120
				event.preventDefault();
120
				event.preventDefault();
121
			});
121
			});
122
		}
122
		}
123
		
123
 
124
		$(document).ready(function() {
124
		$(document).ready(function() {
125
			$('a.cel-img-contact').live('click', function(event) {
125
			$('a.cel-img-contact').live('click', function(event) {
126
				event.preventDefault();
126
				event.preventDefault();
127
				ouvrirFenetreContact($(this));
127
				ouvrirFenetreContact($(this));
128
			});
128
			});
129
		});
129
		});
130
		
130
 
131
		function ouvrirFenetrePopup(lienImage) {
131
		function ouvrirFenetrePopup(lienImage) {
132
			var url = "?mode=popup&url_image="+lienImage.attr('href')+'&galerie_id=<?= $galerie_id ?>';
132
			var url = "?mode=popup&url_image="+lienImage.attr('href')+'&galerie_id=<?php echo $galerie_id;?>';
133
			window.open(url, '', 'directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no, width='+(700)+', height='+(650));
133
			window.open(url, '', 'directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no, width='+(700)+', height='+(650));
134
		}
134
		}
135
		
135
 
136
		
136
 
137
		function ouvrirFenetreContact(lienImage) {
137
		function ouvrirFenetreContact(lienImage) {
138
			var url = lienImage.attr("href");
138
			var url = lienImage.attr("href");
139
			window.open(url, '_blank', 'directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no, width='+(400)+', height='+(550));
139
			window.open(url, '_blank', 'directories=no,titlebar=no,toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no, width='+(400)+', height='+(550));
140
		}
140
		}
141
		//]]>
141
		//]]>
142
	</script>
142
	</script>
143
<?php endif; ?>
143
<?php endif;?>
144
</div>
144
</div>
145
<!-- WIDGET:CEL:PHOTO - FIN -->
-
 
146
145
<!-- WIDGET:CEL:PHOTO - FIN -->
-
 
146