Blame view

src/Template/Sites/index.ctp 2.11 KB
64fba1a2   Alexandre   Base du projet : ...
1

96b028a1   Alexandre   Migration de tout...
2
3
<div class="sites index">
<?php echo '<h2><i class="icon-list"></i> Liste des sites</h2>'; ?>
d653b27f   Thibaud Ajas   Correction de fau...
4
    <table style="border-collapse: separate; border-spacing: 0;">
6c4edfa3   Alexandre   First Commit LabI...
5
6
        <thead>
            <tr>
0ea7290f   Alexandre   Version: 2.5.4.2
7
            	<th class="actions"><?= __('') ?></th>
96b028a1   Alexandre   Migration de tout...
8
                <th><?= $this->Paginator->sort('nom', 'Nom') ?></th>
0ea7290f   Alexandre   Version: 2.5.4.2
9
                
6c4edfa3   Alexandre   First Commit LabI...
10
11
12
            </tr>
        </thead>
        <tbody>
b2b6828b   Alexandre   Version: 2.4.6.7
13
14
15
16
17
18
            <?php foreach ($sites as $site): 
            
            if($site->id != 9) {
            ?>
            
            
6c4edfa3   Alexandre   First Commit LabI...
19
            <tr>
602e9d7a   Alexandre   Version: 2.5.5.0
20
                 <td class="actions" style="padding: 6px 0; text-align: left;">             
08d8dbb0   Alexandre   Version: 2.4.2.14
21
                    <?php if (in_array($role, ['Administration Plus', 'Super Administrateur'])) { ?>
96b028a1   Alexandre   Migration de tout...
22
                    <?= $this->Html->link(__('<i class="icon-pencil"></i>'), ['action' => 'edit', $site->id], ['title' => 'Editer', 'style' => 'margin: 0 2px', 'escape' => false ]) ?>
9fc6b8a2   Alexandre   Version: 2.4.2.6
23
24
25
                    <?php } ?>
                    
                    <?php if (in_array($role, ['Super Administrateur'])) { ?>
96b028a1   Alexandre   Migration de tout...
26
                    <?= $this->Form->postLink(__('<i class="icon-trash"></i>'), ['action' => 'delete', $site->id], ['title' => 'Supprimer', 'style' => 'margin: 0 2px', 'escape' => false, 'confirm' => __('Êtes-vous sur de vouloir supprimer # {0}?', $site->id)]) ?>
9fc6b8a2   Alexandre   Version: 2.4.2.6
27
                	<?php } ?>
6c4edfa3   Alexandre   First Commit LabI...
28
                </td>
0ea7290f   Alexandre   Version: 2.5.4.2
29
30
31
32
            
                <td class="smallText"><?= $this->Html->link($site->nom, ['action' => 'view', $site->id]) ?></td>


96b028a1   Alexandre   Migration de tout...
33

6c4edfa3   Alexandre   First Commit LabI...
34
            </tr>
b2b6828b   Alexandre   Version: 2.4.6.7
35
36
            <?php } 
            endforeach; ?>
6c4edfa3   Alexandre   First Commit LabI...
37
38
        </tbody>
    </table>
96b028a1   Alexandre   Migration de tout...
39

4260780b   Alexandre   Migration vue, co...
40
    <p><?= $this->Paginator->counter(['format' => 'Page {{page}} sur {{pages}}']) ?></p>
96b028a1   Alexandre   Migration de tout...
41
42
43
44
45
      	
   	<div class="paging">
            <?= $this->Paginator->prev('< ' . __(''), ['class' => 'prev disabled']) ?>
            <?= $this->Paginator->numbers(['separator' => '']) ?>
            <?= $this->Paginator->next(__('') . ' >', ['class' => 'next disabled']) ?>
6c4edfa3   Alexandre   First Commit LabI...
46
    </div>
96b028a1   Alexandre   Migration de tout...
47

6c4edfa3   Alexandre   First Commit LabI...
48
</div>
4260780b   Alexandre   Migration vue, co...
49
50
51
52
53
54
55

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