Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 202 | 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">
33
					<a href="<?=$nom['urlFiche']?>" ><?=$nom['nomSci']?></a>
34
				</td><td >
35
					<?php if (isset($imagesUrls[$nnTaxon])) : ?>
36
						<img src="<?=$imagesUrls[$nnTaxon][0]?>" style="width:100px;height:100px;display:block;float:right;"/>
235 delphine 37
					<?php else : ?>
38
						<div class="absent">PAS DE PHOTO<br /><br /><br />
39
							<a href="http://www.tela-botanica.org/appli:cel2#81722" title="Ajouter une photographie au moyen du Carnet en Ligne" onclick="window.open(this.href); return false;">Contribuez <br />à l'album</a>
40
							<br />
41
						</div>
202 delphine 42
					<?php endif; ?>
43
				</td></tr>
44
				</tbody>
45
				</table>
199 delphine 46
			</li>
47
		<? endforeach; ?>
48
	</ul>
202 delphine 49
<?php endif; ?>
50
<script type="text/javascript">
51
	//<![CDATA[
52
	$(document).ready(function() {
53
		ajouterToggleSynonymesAutres();
54
	});
55
	function ajouterToggleSynonymesAutres() {
56
		$("ul#ef-resultats-nv-determination li").each(function(index) {
57
			$(this).find('.synonymes-autres').prepend('<a id="bascule-'+index+'" href="#">et plus...</a>');
58
			$(this).find('.synonymes-autres ul').css('display', 'none');
59
			$(this).find('.synonymes-autres ul').attr('id', 'sa-'+index);
60
 
61
			$('#bascule-'+index).on('click', function() {
62
				$('#sa-'+index).toggle('blind', {}, 500);
63
				return false;
64
			});
65
		});
66
	}
67
	//]]>
68
</script>