index.ctp 1.87 KB

<div class="formules index">
	
	<?php echo '<h2><i class="icon-list"></i> Liste des formules ('.$nbFormules.')</h2>'; ?>
    
    <?=$this->element('button_add'); ?>
    
    <table cellpadding="0" cellspacing="0">
		<thead>
			<tr>
				<th class="actions"><?= __('') ?></th>
				<th><?= $this->Paginator->sort('id', 'N°') ?></th>
				<th><?= $this->Paginator->sort('nommesure', 'Nom mesure') ?></th>
				<th><?= $this->Paginator->sort('symbole', 'Symbole') ?></th>
				<th><?= $this->Paginator->sort('nbVariable', 'Nombre de variable') ?></th>
				<th><?= $this->Paginator->sort('formule', 'Formule') ?></th>


			</tr>
		</thead>
		<tbody>
            <?php foreach ($formules as $formule): ?>
            <tr>
				<td class="actions" style="padding: 6px 0; text-align: left;">
                    <?php if($role == 'Responsable' || $role == 'Super Administrateur') { ?>
                    <?= $this->Form->postLink(__('<i class="icon-trash"></i>'), ['action' => 'delete', $formule->id], ['title' => 'Supprimer', 'style' => 'margin: 0 2px', 'escape' => false, 'confirm' => __('Êtes-vous sur de vouloir supprimer # {0}?', $formule->id)]) ?>
              		<?php } ?>
                </td>
				<td class="smallText"><?php echo $this->Html->link('Formule '.$this->Number->format($formule->id), ['action' => 'view', $formule->id])?></td>
				<td class="smallText"><?= h($formule->nommesure) ?></td>
				<td class="smallText"><?= h($formule->symbole) ?></td>
				<td class="smallText"><?= h($formule->nbVariable) ?></td>
				<td class="smallText"><?= h($formule->formule) ?></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' => 'Formules',
    'singularHumanName' => 'Formule'
])?>
		</div>
-->