Subversion Repositories Applications.referentiel

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
6 jpm 1
<!-- REF - DEBUT TEST -->
2
<script type="text/javascript">
3
	// Function pour cacher / afficher les options de recherche
4
	$(document).ready(function(){
5
 
6
		//Hide (Collapse) the toggle containers on load
7
		$(".test .info").hide();
8
 
9
		//Switch the "Open" and "Close" state per click
10
		$(".test h2").toggle(function(){
11
			$(this).addClass("active");
12
			}, function () {
13
			$(this).removeClass("active");
14
		});
15
 
16
		//Slide up and down on click
17
		$(".test h2").click(function(){
18
			$(this).next(".test .info").slideToggle("slow");
19
		});
20
 
21
	});
22
</script>
23
<h1>Tests</h1>
24
 
25
<?php foreach ($tests as $test) : ?>
26
<div class="test">
27
	<h2 class="<?=$test['resultat'] ? 'ok' : 'ko';?>"><a href="#"><?=$test['titre']?></a> <span class="resultat"><?=$test['resultat'] ? 'ok' : 'ko';?></span></h2>
28
	<div class="info">
29
		<p class="description"><?=$test['description']?></p>
30
		<?php if (isset($test['message'])) : ?>
31
			<?php if (is_array($test['message'])) : ?>
32
			<table>
33
				<caption><?=count($test['message']['lignes'])?> lignes en erreur</caption>
34
				<thead>
35
					<tr>
36
					<?php foreach ($test['message']['entete'] as $entete) : ?>
37
						<th><?=$entete?></th>
38
					<?php endforeach; ?>
39
					</tr>
40
				</thead>
41
				<tbody>
42
					<?php foreach ($test['message']['lignes'] as $ligne) : ?>
43
						<tr>
44
						<?php foreach ($ligne as $info) : ?>
45
							<td><?=$info?></td>
46
						<?php endforeach; ?>
47
						</tr>
48
					<?php endforeach; ?>
49
				</tbody>
50
			</table>
51
			<?php else : ?>
52
			<p class="message"><?=$test['message']?></p>
53
			<?php endif; ?>
54
		<?php endif; ?>
55
	</div>
56
</div>
57
<?php endforeach; ?>
58
<!-- REF - FIN TEST -->