Blame view

src/Template/Unites/index.ctp 1.91 KB
b3dceb2a   Alexis Proust   Ajout nouveaux fi...
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

<div class="unites index">
<?php echo '<h2><i class="icon-list"></i> Liste des Unites</h2>'; ?>
    <table cellpadding="0" cellspacing="0">
        <thead>
            <tr>
            	<th class="actions"><?= __('') ?></th>
                <th><?= $this->Paginator->sort('nom', 'Nom') ?></th>
                <th><?= $this->Paginator->sort('symbole', 'Symbole') ?></th>
            </tr>
        </thead>
        <tbody>
            <?php foreach ($unites as $unite): 
            
            if($unite->id != 9) {
            ?>
            
            
            <tr>
                 <td class="actions" style="padding: 6px 0; text-align: left;">             
                    <?php if (in_array($role, ['Administration Plus', 'Super Administrateur'])) { ?>
                    <?= $this->Html->link(__('<i class="icon-pencil"></i>'), ['action' => 'edit', $unite->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', $unite->id], ['title' => 'Supprimer', 'style' => 'margin: 0 2px', 'escape' => false, 'confirm' => __('Êtes-vous sur de vouloir supprimer # {0}?', $unite->id)]) ?>
                	<?php } ?>
                </td>
            
                <td class="smallText"><?= $this->Html->link($unite->nom, ['action' => 'view', $unite->id]) ?></td>

				<td class="smallText"><?= $this->Html->div('',$unite->symbole) ?></td>

            </tr>
            <?php } 
            endforeach; ?>
        </tbody>
    </table>

9478e982   Etienne Pallier   refactorisation d...
40
41
	<?php echo $this->element('pagination'); ?> 
    
b3dceb2a   Alexis Proust   Ajout nouveaux fi...
42
43
44
45
46
47
48
49
</div>

    	<div class="actions">
			<?php echo $this->element('menu') ?>
			<?php echo $this->element('menu_index', 
			[ 'pluralHumanName' => 'Unites',
			'singularHumanName' => 'Unite' ]) ?>
		</div>