Subversion Repositories Applications.referentiel

Compare Revisions

Ignore whitespace Rev 5 → Rev 6

/trunk/squelettes/test.tpl.html
New file
0,0 → 1,58
<!-- REF - DEBUT TEST -->
<script type="text/javascript">
// Function pour cacher / afficher les options de recherche
$(document).ready(function(){
//Hide (Collapse) the toggle containers on load
$(".test .info").hide();
//Switch the "Open" and "Close" state per click
$(".test h2").toggle(function(){
$(this).addClass("active");
}, function () {
$(this).removeClass("active");
});
//Slide up and down on click
$(".test h2").click(function(){
$(this).next(".test .info").slideToggle("slow");
});
});
</script>
<h1>Tests</h1>
 
<?php foreach ($tests as $test) : ?>
<div class="test">
<h2 class="<?=$test['resultat'] ? 'ok' : 'ko';?>"><a href="#"><?=$test['titre']?></a> <span class="resultat"><?=$test['resultat'] ? 'ok' : 'ko';?></span></h2>
<div class="info">
<p class="description"><?=$test['description']?></p>
<?php if (isset($test['message'])) : ?>
<?php if (is_array($test['message'])) : ?>
<table>
<caption><?=count($test['message']['lignes'])?> lignes en erreur</caption>
<thead>
<tr>
<?php foreach ($test['message']['entete'] as $entete) : ?>
<th><?=$entete?></th>
<?php endforeach; ?>
</tr>
</thead>
<tbody>
<?php foreach ($test['message']['lignes'] as $ligne) : ?>
<tr>
<?php foreach ($ligne as $info) : ?>
<td><?=$info?></td>
<?php endforeach; ?>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php else : ?>
<p class="message"><?=$test['message']?></p>
<?php endif; ?>
<?php endif; ?>
</div>
</div>
<?php endforeach; ?>
<!-- REF - FIN TEST -->