Subversion Repositories Applications.referentiel

Rev

Rev 38 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
33 jpm 1
<!-- REF - DEBUT TEST -->
2
<script type="text/javascript">
3
$(document).ready(function() {
4
	$('#ref-dem-ok').click(function(e) {
5
		var ok = false;
6
		if (confirm('Êtes vous sûr de vouloir lancer un nouveau traitement ?')) {
7
			ok = true;
8
		}
9
		return ok;
10
	});
11
});
12
</script>
13
<h1>Tests du référentiel «&nbsp;<?=$ref;?>&nbsp;»</h1>
23 jpm 14
 
33 jpm 15
<h2>Demande de traitement</h2>
16
<?php if (isset($ref)) : ?>
17
<div id="zone-form">
18
	<form id="ref-demande-traitement" name="ref-demande-traitement" action="<?=$url_form;?>" method="get">
19
		<input name="module" type="hidden" value="<?=$url_module;?>" />
20
		<input name="action" type="hidden" value="<?=$url_action_demande;?>" />
21
		<input name="ref" type="hidden" value="<?=$ref;?>" />
38 jpm 22
		<label id="ref-dem-label" for="ref-dem-ok">Faire une demande de traitement</label>
33 jpm 23
		<input id="ref-dem-ok" type="submit" value="Demander" />
24
	</form>
25
	<form id="ref-rafraichir" name="ref-rafraichir" action="<?=$url_form;?>" method="get">
26
		<input name="module" type="hidden" value="<?=$url_module;?>" />
27
		<input name="action" type="hidden" value="<?=$url_action_rafraichir;?>" />
28
		<input name="ref" type="hidden" value="<?=$ref;?>" />
29
		<input id="ref-raf-ok" type="submit" value="Rafraichir" />
30
	</form>
31
</div>
32
<?php endif; ?>
33
 
23 jpm 34
<?php if (isset($messages)) : ?>
35
<h2>Messages</h2>
36
<?php foreach ($messages as $message) : ?>
37
<p class="information"><?=$message;?></p>
38
<?php endforeach; ?>
39
<?php endif; ?>
40
 
39 jpm 41
<h2>Tests</h2>
38 jpm 42
<table>
39 jpm 43
	<caption>Traitements <?=strftime('à %H:%M:%S le %d %B %Y')?></caption>
38 jpm 44
	<thead>
45
		<tr>
46
			<th>Nom (#)</th>
39 jpm 47
			<th>État</th>
48
			<th>Date début</th>
49
			<th>Date fin</th>
50
			<th>Durée</th>
38 jpm 51
		</tr>
52
	</thead>
53
	<tbody>
39 jpm 54
	<?php if (isset($traitements_en_attente)) : ?>
55
		<?php foreach ($traitements_en_attente as $traitement) : ?>
38 jpm 56
		<tr>
39 jpm 57
			<td><?=$traitement['nom']?> <span class="discretion">(id:<?=$traitement['id_traitement']?>)</span></a></td>
58
			<td class="traitement-attente">En attente...</td>
59
			<td>&nbsp;</td>
60
			<td>&nbsp;</td>
61
			<td>&nbsp;</td>
38 jpm 62
		</tr>
39 jpm 63
		<?php endforeach; ?>
64
	<?php endif; ?>
65
	<?php if (isset($traitements_en_cours)) : ?>
66
		<?php foreach ($traitements_en_cours as $traitement) : ?>
33 jpm 67
		<tr>
39 jpm 68
			<td><?=$traitement['nom']?> <span class="discretion">(id:<?=$traitement['id_traitement']?>)</span></a></td>
69
			<td class="traitement-cours">En cours...</td>
33 jpm 70
			<td><?=$traitement['date_debut']?></td>
39 jpm 71
			<td>&nbsp;</td>
72
			<td>&nbsp;</td>
33 jpm 73
		</tr>
39 jpm 74
		<?php endforeach; ?>
75
	<?php endif; ?>
76
	<?php if (isset($traitements_termines)) : ?>
77
		<?php foreach ($traitements_termines as $traitement) : ?>
33 jpm 78
		<tr>
79
			<td><a href="<?=$traitement['url']?>"><?=$traitement['nom']?> <span class="discretion">(id:<?=$traitement['id_traitement']?>)</span></a></td>
39 jpm 80
			<td class="traitement-termine">Terminé</td>
33 jpm 81
			<td><?=$traitement['date_debut']?></td>
82
			<td><?=$traitement['date_fin']?></td>
83
			<td><?=$traitement['duree']?></td>
84
		</tr>
39 jpm 85
		<?php endforeach; ?>
86
	<?php endif; ?>
33 jpm 87
	</tbody>
88
</table>
89
<!-- REF - FIN TEST -->