Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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

Rev Author Line No. Line
161 jpm 1
<?php if ($noms) : ?>
199 delphine 2
	<ul id="ef-resultats-nv-determination">
3
		<? foreach ($noms as $nnTaxon => $nom) : ?>
4
			<li class="zone-resultat">
202 delphine 5
				<table >
6
				<tbody >
7
				<tr><td class="nom">
8
					<?php if (isset($nom['nomVerna'])) : ?>
9
						<?php $nbrNomVerna = count($nom['nomVerna']) ?>
10
						<ul class="synonymes" style="width:100%;">
11
							<?php for ($i = 0; ($i < 3); $i++) : ?>
12
								<?php if (isset($nom['nomVerna'][$i])) : ?>
13
									<li><?=$nom['nomVerna'][$i]['nom_vernaculaire']?></li>
14
								<?php endif; ?>
15
							<? endfor; ?>
16
							<?php if ($nbrNomVerna === 4) : ?>
17
								<?php if (isset($nom['nomVerna'][3])) : ?>
18
									<li><?=$nom['nomVerna'][3]['nom_vernaculaire']?></li>
19
								<?php endif; ?>
199 delphine 20
							<?php endif; ?>
202 delphine 21
							<?php if ($nbrNomVerna > 3 && $nbrNomVerna != 4) : ?>
22
								<li class="synonymes-autres">
23
									<ul>
24
										<?php for ($i = 3; $i < $nbrNomVerna; $i++) : ?>
25
											<li><?=$nom['nomVerna'][$i]['nom_vernaculaire']?></li>
26
										<? endfor; ?>
27
									</ul>
28
								</li>
29
							<?php endif; ?>
30
						</ul>
31
					<?php endif; ?>
32
				</td><td class="nom">
431 delphine 33
					<a href="<?=$nom['urlFiche']?>" ><?=$nom['nomSci']?></a>
282 gduche 34
				</td>
312 jpm 35
				<td>
619 mathilde 36
					<?php  if (isset($imagesCoste[$taxons[$nom['nomSci']]][0])) : ?>
37
					<img src="<?=htmlentities($imagesCoste[$taxons[$nom['nomSci']]][0])?>" alt="illustration de Coste" />
38
				<?php else : ?>
39
					<div class="absent">
40
					Pas d'illustration de Coste.</div>
41
				<?php endif; ?>
42
				</td>
43
				<td>
312 jpm 44
					<?php if (isset($repartition['urls'][$nnTaxon])) : ?>
430 delphine 45
						<img src="<?=htmlentities($repartition['urls'][$nnTaxon])?>" alt="Carte de répartition" class="repartition_vignette"/>
312 jpm 46
					<?php else : ?>
47
						<div class="absent">Pas de carte</div>
48
					<?php endif; ?>
430 delphine 49
				</td>
282 gduche 50
				<td >
202 delphine 51
					<?php if (isset($imagesUrls[$nnTaxon])) : ?>
430 delphine 52
						<img src="<?=htmlentities($imagesUrls[$nnTaxon][0])?>" alt="Images issues du CEL" style="width:100px;height:100px;display:block;float:right;"/>
235 delphine 53
					<?php else : ?>
312 jpm 54
						<p class="absent">
55
						Pas de photo<br />
56
						<a href="http://www.tela-botanica.org/appli:cel#<?=$nnTaxon?>"
57
							title="Ajouter une photographie au moyen du Carnet en Ligne"
362 gduche 58
							onclick="window.open(this.href); return false;" class="contribuer">
59
							Contribuer
312 jpm 60
						</a>
61
					</p>
202 delphine 62
					<?php endif; ?>
63
				</td></tr>
64
				</tbody>
65
				</table>
199 delphine 66
			</li>
67
		<? endforeach; ?>
68
	</ul>
202 delphine 69
<?php endif; ?>
70
<script type="text/javascript">
71
	//<![CDATA[
72
	$(document).ready(function() {
73
		ajouterToggleSynonymesAutres();
74
	});
75
	function ajouterToggleSynonymesAutres() {
76
		$("ul#ef-resultats-nv-determination li").each(function(index) {
77
			$(this).find('.synonymes-autres').prepend('<a id="bascule-'+index+'" href="#">et plus...</a>');
78
			$(this).find('.synonymes-autres ul').css('display', 'none');
79
			$(this).find('.synonymes-autres ul').attr('id', 'sa-'+index);
80
 
81
			$('#bascule-'+index).on('click', function() {
82
				$('#sa-'+index).toggle('blind', {}, 500);
83
				return false;
84
			});
85
		});
86
	}
87
	//]]>
88
</script>