Blame view

src/Template/TypeDocuments/index.ctp 2.19 KB
9b4da83b   Alexandre   Version: 2.5.0.0
1
2
3
4
5
6

<div class="typeDocuments index">
<?php echo '<h2><i class="icon-list"></i> Liste des types de documents</h2>'; ?>
    <table cellpadding="0" cellspacing="0">
        <thead>
            <tr>
0ea7290f   Alexandre   Version: 2.5.4.2
7
             	<th class="actions"><?= __('') ?></th>
9b4da83b   Alexandre   Version: 2.5.0.0
8
                <th><?= $this->Paginator->sort('nom', 'Nom') ?></th>
9b4da83b   Alexandre   Version: 2.5.0.0
9
10
11
12
13
            </tr>
        </thead>
        <tbody>
            <?php 
            foreach ($typeDocuments as $typeDocument): 
aca4ed9b   Alexandre   Version: 2.5.4.0
14
15
            
            if($typeDocument->nom != 'N/A') {
9b4da83b   Alexandre   Version: 2.5.0.0
16
17
18
            ?>
            
            <tr>
0ea7290f   Alexandre   Version: 2.5.4.2
19
                <td class="actions" style="padding: 6px 0; text-align: left;">
9b4da83b   Alexandre   Version: 2.5.0.0
20
21
22
23
24
25
26
27
                    <?php if (in_array($role, ['Administration Plus', 'Super Administrateur'])) { ?>
                    <?= $this->Html->link(__('<i class="icon-pencil"></i>'), ['action' => 'edit', $typeDocument->id], ['title' => 'Editer', 'style' => 'margin: 0 2px', 'escape' => false ]) ?>
                    <?php } ?>
                    
                    <?php if (in_array($role, ['Super Administrateur'])) { ?>
                    <?= $this->Form->postLink(__('<i class="icon-trash"></i>'), ['action' => 'delete', $typeDocument->id], ['title' => 'Supprimer', 'style' => 'margin: 0 2px', 'escape' => false, 'confirm' => __('Êtes-vous sur de vouloir supprimer # {0}?', $typeDocument->id)]) ?>
               		<?php } ?>
                </td>
0ea7290f   Alexandre   Version: 2.5.4.2
28
29
30
                <td class="smallText"><?= $this->Html->link($typeDocument->nom, ['action' => 'view', $typeDocument->id]) ?></td>


9b4da83b   Alexandre   Version: 2.5.0.0
31
32
33
34

            </tr>
            
            <?php 
aca4ed9b   Alexandre   Version: 2.5.4.0
35
            }
9b4da83b   Alexandre   Version: 2.5.0.0
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
            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' => 'Types Documents',
			'singularHumanName' => 'Type Document' ]) ?>
		</div>