Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 235 | Rev 312 | 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>
282 gduche 34
				</td>
35
				<td><img src="<?=$nom['repartition_vignette']?>" alt="carte de répartition" class="repartition_vignette"/></td>
36
				<td >
202 delphine 37
					<?php if (isset($imagesUrls[$nnTaxon])) : ?>
38
						<img src="<?=$imagesUrls[$nnTaxon][0]?>" style="width:100px;height:100px;display:block;float:right;"/>
235 delphine 39
					<?php else : ?>
40
						<div class="absent">PAS DE PHOTO<br /><br /><br />
41
							<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>
42
							<br />
43
						</div>
202 delphine 44
					<?php endif; ?>
45
				</td></tr>
46
				</tbody>
47
				</table>
199 delphine 48
			</li>
49
		<? endforeach; ?>
50
	</ul>
202 delphine 51
<?php endif; ?>
52
<script type="text/javascript">
53
	//<![CDATA[
54
	$(document).ready(function() {
55
		ajouterToggleSynonymesAutres();
56
	});
57
	function ajouterToggleSynonymesAutres() {
58
		$("ul#ef-resultats-nv-determination li").each(function(index) {
59
			$(this).find('.synonymes-autres').prepend('<a id="bascule-'+index+'" href="#">et plus...</a>');
60
			$(this).find('.synonymes-autres ul').css('display', 'none');
61
			$(this).find('.synonymes-autres ul').attr('id', 'sa-'+index);
62
 
63
			$('#bascule-'+index).on('click', function() {
64
				$('#sa-'+index).toggle('blind', {}, 500);
65
				return false;
66
			});
67
		});
68
	}
69
	//]]>
70
</script>