index.ctp 1.68 KB

<div class="organismes index">
	
	<?php echo '<h2><i class="icon-list"></i> Liste des organismes</h2>'; ?>
	
	<?=$this->element('button_add'); ?>
    
    <table style="border-collapse: separate; border-spacing: 0; width: 270px;">
		<thead>
			<tr>
				<th class="actions"><?= __('') ?></th>
				<th><?= $this->Paginator->sort('nom', 'Nom') ?></th>

			</tr>
		</thead>
		<tbody>
            <?php foreach ($organismes as $organisme): ?>
            <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', $organisme->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', $organisme->id], ['title' => 'Supprimer', 'style' => 'margin: 0 2px', 'escape' => false, 'confirm' => __('Êtes-vous sur de vouloir supprimer # {0}?', $organisme->id)]) ?>
                	<?php } ?>
                </td>

				<td class="smallText"><?= $this->Html->link($organisme->nom, ['action' => 'view', $organisme->id]) ?></td>

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

	<?php echo $this->element('pagination'); ?> 
    
</div>

<!--
<div class="actions">
			<php echo $this->element('menu') ?>
			<php

echo $this->element('menu_index', [
    'pluralHumanName' => 'Organismes',
    'singularHumanName' => 'Organisme'
])?>
		</div>
-->