index.ctp
3.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<div class="materiels index">
<?php echo '<h2><i class="icon-list"></i> Liste des matériels (nombre pas impléménté)</h2>'; ?>
<table cellpadding="0" cellspacing="0">
<thead>
<tr>
<th><?= $this->Paginator->sort('designation','Désignation') ?></th>
<th><?= $this->Paginator->sort('numero_laboratoire', 'N° interne (labo)') ?></th>
<th><?= $this->Paginator->sort('categorie_id', 'Catégorie') ?></th>
<th><?= $this->Paginator->sort('organisme_id', 'Org.') ?></th>
<th><?= $this->Paginator->sort('numero_inventaire_organisme', 'N° Invent. Org.') ?></th>
<th><?= $this->Paginator->sort('nom_responsable', 'Responsable') ?></th>
<th><?= $this->Paginator->sort('status', 'Statut') ?></th>
<th><?= $this->Paginator->sort('date_acquisition', 'Date Achat') ?></th>
<th><?= $this->Paginator->sort('etiquette', 'Et') ?></th>
<th class="actions"><?= __('') ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($materiels as $materiel): ?>
<tr>
<td><?= $materiel->has('designation') ? $this->Html->link($materiel->designation, ['controller' => 'Materiels', 'action' => 'view', $materiel->id]) : '' ?></td>
<td><?= h($materiel->numero_laboratoire) ?></td>
<td><?= $materiel->has('category') ? h($materiel->category->nom) : '' ?></td>
<td><?= $materiel->has('organisme') ? h($materiel->organisme->nom) : '' ?></td>
<td><?= h($materiel->numero_inventaire_organisme) ?></td>
<td><?= h($materiel->nom_responsable) ?></td>
<td><?= h($materiel->status) ?></td>
<td><?= h($materiel->date_acquisition) ?></td>
<td><?php if (h($materiel->etiquette) == '1') { echo 'Y'; } else { echo 'N'; } ?></td>
<td class="actions" style="padding: 6px 0;">
<?= $this->Html->link(__('<i class="icon-pencil"></i>'), ['action' => 'edit', $materiel->id], ['title' => 'Editer', 'style' => 'margin: 0 2px', 'escape' => false ]) ?>
<?php
//A implementer --> bouton valider/archivé
//$this->Html->link(__('<i class="icon-eye-open"></i>'), ['action' => 'view', $materiel->id], ['title' => 'Visualiser', 'style' => 'margin: 0 2px', 'escape' => false ])
//A implementer --> bouton suppression caché si matériel validé
?>
<?= $this->Form->postLink(__('<i class="icon-trash"></i>'), ['action' => 'delete', $materiel->id], ['title' => 'Supprimer', 'style' => 'margin: 0 2px', 'escape' => false ], ['confirm' => __('Êtes-vous sur de vouloir supprimer # {0}?', $materiel->id)]) ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<h3><?= $this->Paginator->counter(['format' => 'Page {{page}} sur {{pages}}']) ?></h3>
<div class="paging" style="color: black;">
<?= $this->Paginator->first('<< ' . __(''), ['class' => 'prev']) ?>
<?= $this->Paginator->prev('< ' . __(''), ['class' => 'prev disabled']) ?>
<?= $this->Paginator->numbers(['separator' => '']) ?>
<?= $this->Paginator->next(__('') . ' >', ['class' => 'next disabled']) ?>
<?= $this->Paginator->last(__('') . ' >>', ['class' => 'next']) ?>
</div>
</div>