index.ctp
2.82 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
<div class="documents index">
<?php echo '<h2><i class="icon-list"></i> Liste des fichiers</h2>'; ?>
<table cellpadding="0" cellspacing="0">
<thead>
<tr>
<th><?= $this->Paginator->sort('id', 'N°') ?></th>
<th><?= $this->Paginator->sort('chemin', 'Chemin') ?></th>
<th><?= $this->Paginator->sort('type_doc', 'Type') ?></th>
<th><?= $this->Paginator->sort('materiel_id', 'Materiel') ?></th>
<th><?= $this->Paginator->sort('suivi_id', 'Suivi') ?></th>
<th><?= $this->Paginator->sort('materiel_id', 'Numéro Materiel (labo)') ?></th>
<th class="actions"><?= __('') ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($documents as $document): ?>
<tr>
<td><?= 'Fichier '.$this->Number->format($document->id) ?></td>
<td><?= h($document->chemin) ?></td>
<td><?= h($document->type_doc) ?></td>
<td><?= $document->has('materiel') ? $this->Html->link($document->materiel->designation, ['controller' => 'Materiels', 'action' => 'view', $document->materiel->id]) : '' ?></td>
<td><?= $document->has('suivi') ? $this->Html->link('Suivi '.$document->suivi->id, ['controller' => 'Suivis', 'action' => 'view', $document->suivi->id]) : '' ?></td>
<td><?= $document->has('materiel') ? $document->materiel->numero_laboratoire : '' ?></td>
<td class="actions" style="padding: 6px 0;">
<?= $this->Html->link(__('<i class="icon-eye-open"></i>'), ['action' => 'view', $document->id], ['title' => 'Visualiser', 'style' => 'margin: 0 2px', 'escape' => false ]) ?>
<?= $this->Html->link(__('<i class="icon-pencil"></i>'), ['action' => 'edit', $document->id], ['title' => 'Editer', 'style' => 'margin: 0 2px', 'escape' => false ]) ?>
<?= $this->Form->postLink(__('<i class="icon-trash"></i>'), ['action' => 'delete', $document->id], ['title' => 'Supprimer', 'style' => 'margin: 0 2px', 'escape' => false, 'confirm' => __('Êtes-vous sur de vouloir supprimer # {0}?', $document->id)]) ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<p><?= $this->Paginator->counter(['format' => 'Page {{page}} sur {{pages}}']) ?></p>
<div class="paging">
<?= $this->Paginator->prev('< ' . __(''), ['class' => 'prev disabled']) ?>
<?= $this->Paginator->numbers(['separator' => '']) ?>
<?= $this->Paginator->next(__('') . ' >', ['class' => 'next disabled']) ?>
</div>
</div>
<div class="actions">
<?php echo $this->element('menu') ?>
<?php echo $this->element('menu_index',
[ 'pluralHumanName' => 'Fichiers',
'singularHumanName' => 'Fichier' ]) ?>
</div>