Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 984 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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