Subversion Repositories Sites.tela-botanica.org

Rev

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

Rev Author Line No. Line
828 gduche 1
<!-- SYNDICATION - DEBUT -->
907 gduche 2
<!--
3
 
4
Penser aux inclusions ci dessous :
5
<script type="text/javascript" src="/commun/jquery/1.4.2/jquery-1.4.2.min.js"></script>
6
<script type="text/javascript" src="/commun/jquery/fancybox/jquery.fancybox-1.3.2.js"></script>
7
<link rel="stylesheet" type="text/css" href="/commun/jquery/fancybox/jquery.fancybox-1.3.2.css" media="screen" /> /-->
828 gduche 8
	<div class="flux_RSS">
9
		<?php if ($erreurs || $informations) : ?>
10
			<h1>Erreur</h1>
11
			<div class="contenu_RSS">
12
				<b>Impossible d'afficher le flux.</b><br />
13
 
14
				<!-- Affichage des erreurs et messages d'information : -->
15
				<?php if ($erreurs) : ?>
16
					<?php foreach ($erreurs as $erreur) : ?>
17
						<p class="pap_erreur"><?=$erreur;?></p>
18
					<?php endforeach; ?>
19
				<?php endif; ?>
20
 
21
				<?php if ($informations) : ?>
22
					<?php foreach ($informations as $information) : ?>
23
						<p class="pap_info"><?=$information;?></p>
24
					<?php endforeach; ?>
25
				<?php endif; ?>
26
			</div>
27
		<?php else : ?>
28
			<!-- Affichage du flux RSS -->
29
			<?php $flux = array(); ?>
30
  				<?php foreach ($sites as $site) : ?>
31
  					<h1><?=$site['titre']?></h1>
32
  					<div class="contenu_RSS" <?=($site['id']!="") ? 'id="'.$site["id"].'"' : ""; ?>>
924 gduche 33
  					<a href="http://www.tela-botanica.org/eflore/cel2/jrest/CelSyndicationImage/Simple/rss2/S" class="suivre-observations" title="Suivre les images" target="_blank">Suivre les images</a>
828 gduche 34
    				<?php foreach ($site['pages'] as $page) : ?>
35
    					<?php
928 gduche 36
							//Traitement spécifique tela
37
							// La ligne ci-dessous sert à enlever les "align=left" dans les images génériques par spip
828 gduche 38
							// TODO : enlever du flux RSS
39
							$image = substr_replace($page['image'], ' ', strpos($page['image'], 'align='), 12);
40
						?>
41
    					<?php
42
							$date = strtotime($page['date']);
43
    						$titre_page = preg_replace('/^\d+-\d+&nbsp;:/', '', $page['titre']);
928 gduche 44
						?>
828 gduche 45
    					<div class="actualites1">
928 gduche 46
    						<a href="<?=$page['description']?>" class="image-lien" title="http://www.tela-botanica.org/appli:cel-img:0000<?=$page['guid']?>L" rel="galerie-princ"><img src="http://www.tela-botanica.org/appli:cel-img:0000<?=$page['guid']?>M" alt="<?=$titre_page?>"/></a>
907 gduche 47
 
48
    						<div style="display: none;">
49
								<div id="cel-obs-<?=$page['guid']?>" class="infos-annexe">
50
	    							<a href="<?=$page['description']?>"><span class="image-titre"><?=$titre_page?></span><br />
51
	    							<span class="image-date"> Observée le <?=$page['date']?></span><br />
52
	    							Cliquez pour voir le détail
53
	    							</a>
54
 
55
	    						</div>
56
    						</div>
828 gduche 57
						</div>
58
    				<?php endforeach; ?>
929 gduche 59
    				<!-- img id="imgExtra" src="http://www.tela-botanica.org/appli:cel-img:0000<?=$sites[0]['pages'][7]['guid']?>M" / -->
60
    				<?
61
    					$page = $sites[0]['pages'][7];
62
    				?>
907 gduche 63
    				<div class="actualites1">
929 gduche 64
   						<a href="<?=$page['description']?>" class="image-lien" title="http://www.tela-botanica.org/appli:cel-img:0000<?=$page['guid']?>L" rel="galerie-princ"><img id="imgExtra" src="http://www.tela-botanica.org/appli:cel-img:0000<?=$page['guid']?>M" alt="<?=$titre_page?>"/></a>
65
 
66
   						<div style="display: none;">
67
							<div id="cel-obs-img-extra" class="infos-annexe">
68
    							<a href="<?=$page['description']?>"><span class="image-titre"><?=$titre_page?></span><br />
69
    							<span class="image-date"> Observée le <?=$page['date']?></span><br />
70
    							Cliquez pour voir le détail
71
    							</a>
72
 
907 gduche 73
    						</div>
929 gduche 74
   						</div>
75
					</div>
907 gduche 76
    				<script type="text/Javascript">
928 gduche 77
    					//Remplacer le lien de chaque actualité par un #cel-obs-guid
907 gduche 78
    					$(document).ready(function() {
79
    						$('.actualites1').each(function () {
80
	    						var id = $(this).find('.infos-annexe').attr('id');
81
	    						var lien = $(this).find('.image-lien');
82
	    						lien.attr('href', '#' + id);
83
 
84
	    						$('#' + id).prepend('<img height="500px" src="' + lien.attr('title') + ' /> <br />');
85
	    						lien.fancybox({
86
	    							'titlePosition'		: 'inside',
87
	    							'transitionIn'		: 'none',
88
	    							'transitionOut'		: 'none'
89
	    							});
90
 
91
    						});
92
    					});
93
    				</script>
828 gduche 94
    				</div>
95
  				<?php endforeach; ?>
96
		<?php endif; ?>
922 gduche 97
 
828 gduche 98
	</div>
99
 
100
 
101
 
102
<!-- SYNDICATION - FIN -->