Subversion Repositories Sites.tela-botanica.org

Rev

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