index_recap.ctp 2.25 KB

<div class="users index">
<?php echo '<h2><i class="icon-list"></i> Récapitulatif des Responsables et leur Domaine ('.$nbUsers.')</h2>'; ?>
    <table cellpadding="0" cellspacing="0">
		<thead>
			<tr>
				<th class="actions"><?= __('') ?></th>
				<th><?= $this->Paginator->sort('sur_categorie_id', 'Domaine') ?></th>
				<th><?= $this->Paginator->sort('nom') ?></th>
				<th><?= $this->Paginator->sort('email') ?></th>
				<th class="actions"><?= __('') ?></th>
			</tr>
		</thead>
		<tbody>
            <?php foreach ($users as $user): ?>
            <tr>
				<td class="actions" style="padding: 6px 0; text-align: left;">               
                    <?php if($role == 'Super Administrateur') { ?>
                    <?= $this->Html->link(__('<i class="icon-pencil"></i>'), ['action' => 'edit', $user->id], ['title' => 'Editer', 'style' => 'margin: 0 2px', 'escape' => false ]) ?>
                    <?= $this->Form->postLink(__('<i class="icon-trash"></i>'), ['action' => 'delete', $user->id], ['title' => 'Supprimer', 'style' => 'margin: 0 2px', 'escape' => false, 'confirm' => __('Êtes-vous sur de vouloir supprimer l\'utilisateur {0} ?', $user->nom)]) ?>
                	<?php } ?>
                </td>
				<td class="smallText"><?= $user->has('sur_categorie_id') ? h($user->sur_category->nom) : '' ?></td>
				<td class="smallText"><?= $this->Html->link($user->nom, ['action' => 'view', $user->id]) ?></td>
				<td class="smallText"><?= h($user->email) ?></td>


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


	<!-- PAGINATION --> 
	<?php 
	//echo $this->element('pagination'); 
	echo $this->element('pagination_with_first_and_last');     
	?>     
	<!-- OLD buggy way :
	<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' => 'Utilisateurs',
    'singularHumanName' => 'Utilisateur'
])?>
		</div>
		-->