<tr>
<td><?php echo $produit['Produit']['nom']; ?></td>
<td>
+ <?php echo $this->Html->link(
+ 'Nouvelle version',
+ array('controller' => 'versions', 'action' => 'add', $produit['Produit']['id'])
+ ); ?>
<table>
<tr>
<th>Valeur</th>
<th>Type</th>
<th>Actions</th>
</tr>
+ <?php foreach ($versions as $version): if($version['Version']['produit'] == $produit['Produit']['id']) { ?>
<tr>
- <?php foreach ($versions as $version): if($version['Version']['produit'] == $produit['Produit']['id']) { ?>
- <td><?php echo $version['Version']['valeur']; ?></td>
- <td><?php echo $version['Version']['nature']; ?></td>
- <td>
- <?php echo $this->Html->link(
- $this->Html->image('edit.jpg', array('class' => 'button')),
- array('controller' => 'versions', 'action' => 'edit', $version['Version']['id']),
- array('escape' => false)
- ).' '.
- $this->Form->postLink(
- $this->Html->image('delete.png', array('class' => 'button')),
- array('action' => 'delete', $version['Version']['id']),
- array('escape' => false, 'confirm' => 'Etes-vous certain ?')
- );
- ?>
- </td>
- <?php } endforeach; unset($version); ?>
+ <td><?php echo $version['Version']['valeur']; ?></td>
+ <td><?php echo $version['Version']['nature']; ?></td>
+ <td>
+ <?php echo $this->Html->link(
+ $this->Html->image('edit.jpg', array('class' => 'button')),
+ array('controller' => 'versions', 'action' => 'edit', $version['Version']['id']),
+ array('escape' => false)
+ ).' '.
+ $this->Form->postLink(
+ $this->Html->image('delete.png', array('class' => 'button')),
+ array('action' => 'delete', $version['Version']['id']),
+ array('escape' => false, 'confirm' => 'Etes-vous certain ?')
+ );
+ ?>
+ </td>
</tr>
+ <?php } endforeach; unset($version); ?>
</table>
</td>
<td>