Subversion Repositories eFlore/Applications.cel

Rev

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

Rev Author Line No. Line
745 delphine 1
<div id="cel-observation-contenu">
2
 <?php if (isset($erreurs) || isset($informations)) : ?>
3
	<h1>Erreur &amp; informations</h1>
4
	<p>Impossible d'afficher le flux.</p>
5
	<!-- Affichage des erreurs et messages d'information : -->
6
	<?php if ($erreurs) : ?>
7
		<?php foreach ($erreurs as $erreur) : ?>
8
			<p class="erreur"><?=$erreur;?></p>
9
		<?php endforeach; ?>
10
	<?php endif; ?>
11
 
12
	<?php if ($informations) : ?>
13
		<?php foreach ($informations as $information) : ?>
14
			<p class="info"><?=$information;?></p>
15
		<?php endforeach; ?>
16
	<?php endif; ?>
17
	<?php else : ?>
18
		<h1>
19
			Dernières observations du
20
			<a href="http://www.tela-botanica.org/appli:cel" title="Carnet en Ligne" onclick="window.open(this.href);return false;">
21
				CEL
22
			</a>
23
			<a href="<?=$flux_rss_url?>" id="cel-observation-flux" title="Suivre les observations"
24
				onclick="window.open(this.href);return false;">
25
				<img src="http://www.tela-botanica.org/sites/commun/generique/images/rss.png" alt="Suivre les observations" />
26
			</a>
27
		</h1>
28
		<div id="cel-liste-observation">
29
			<?php foreach ($items as $item) : ?>
30
				<div id="cel-observation-<?=$item['guid']?>" class="cel-observation" rel="<?=$item['guid']?>" >
31
					<img id="imPlus-<?=$item['guid']?>" width="10" height="10"
32
							name="imPlus-<?=$item['guid']?>" title="Voir les informations complémentaires" alt="+"
33
							src="http://www.tela-botanica.org/sites/commun/generique/images/plus.png" />
34
					<img id="imMoins-<?=$item['guid']?>" width="10" height="10" class="imMoins"
35
							name="imMoins-<?=$item['guid']?>" title="Cacher les informations complémentaires" alt="+"
36
							src="http://www.tela-botanica.org/sites/commun/generique/images/moins.png" />
37
					<strong>
1451 aurelien 38
						<?php if ($item['eflore_url'] != '#' && $item['eflore_url'] != '') { ?>
39
							<a class="cel-img-titre" href="<?=$item['eflore_url']?>"
40
								onclick="window.open(this.href);return false;"
41
								title="Cliquez pour accéder à la fiche eFlore">
745 delphine 42
								<?=$item['titre']?>
1451 aurelien 43
							</a>
44
						<?php } else { ?>
45
							<?=$item['titre']?>
46
						<?php } ?>
745 delphine 47
					</strong><br />
48
					<span class="cel-img-date">Publiée le <?=$item['date']?></span><br />
49
 
50
					<div id="cel-info-<?=$item['guid']?>" class="cel-infos">
51
						<?=$item['description']?>
52
					</div>
739 delphine 53
				</div>
745 delphine 54
			<?php endforeach; ?>
55
		</div>
56
		<p id="cel-observation-date-generation" class="discretion nettoyage">Au <?=strftime('%A %d %B %Y à %H:%M:%S')?></p>
57
		<script type="text/Javascript">
58
				// Function pour cacher / afficher le détail des observations
59
				$(document).ready(function() {
739 delphine 60
 
745 delphine 61
					$('.cel-infos').hide();
62
					$('.imMoins').hide();
63
					$('.cel-observation').hover(function() {
64
						var id_obs = $(this).attr("rel");
65
						$('#cel-info-'+id_obs).show();
66
						$('#imPlus-'+id_obs).hide();
67
						$('#imMoins-'+id_obs).show();
68
					},
69
					function() {
70
						var id_obs = $(this).attr("rel");
71
						$('#cel-info-'+id_obs).hide();
72
						$('#imPlus-'+id_obs).show();
73
						$('#imMoins-'+id_obs).hide();
74
 
75
					});
739 delphine 76
 
745 delphine 77
				});
78
		</script>
79
	<?php endif; ?>
80
</div>