<?php $settings = sfConfig::get('app_admin_' . $this->getModuleName()) ?>
<?php $model_columns = array() ?>
<?php foreach ($this->getTableMap()->getColumns() as $column): ?>
<?php $model_columns[$column->getPhpName()] = $column ?>
<?php endforeach ?>
<?php $form = $this->getFormObject() ?>
<div class="content-add01">
	<div class="heading01"><h1>Liste des <?php echo $settings['plural'] ?> ([?php echo $pager->getNbResults() ?])</h1></div>
</div>

[?php if(empty($<?php echo $this->getSingularName() ?>List)): ?]
	<p>Aucun <?php echo $settings['singular'] ?>.</p>
	<p>[?php echo link_to('Ajouter un <?php echo $settings['singular'] ?>', '@<?php echo $settings['routing'] ?>_add', array('class' => 'add')) ?]</p>
[?php else : ?]
  [?php echo link_to('Ajouter un <?php echo $settings['singular'] ?>', '@<?php echo $settings['routing'] ?>_add', array('class' => 'add')) ?]
  <table class="admin-list">
    <tr>
<?php foreach ($settings['columns'] as $php_name => $column_properties): ?>
	  <th nowrap="nowrap"><?php echo $column_properties['header'] ?> [?php echo sort_links($sf_request, '<?php echo $column_properties['sort'] ?>', '<?php echo $this->getModuleName() ?>/index') ?]</th>
<?php endforeach ?>
	  <th nowrap="nowrap" width="1%">Actions</th>
	</tr>
	[?php foreach ($<?php echo $this->getSingularName() ?>List as/*(<?php echo ucfirst($this->getModuleName()) ?>)*/ $<?php echo $this->getSingularName() ?>): ?]
    <tr align="center">
	<?php foreach ($settings['columns'] as $php_name => $column_properties): ?>
	  <td<?php echo !empty($column_properties['nowrap'])?' nowrap="nowrap"':'' ?>>[?php echo $<?php echo $this->getSingularName() ?>-><?php echo $column_properties['method'] ?>() ?]</td>
	<?php endforeach ?>
	  <td nowrap="nowrap">
	    [?!--php echo catalyz_link_to_image_tag('@<?php echo $settings['routing'] ?>_show?id='.$<?php echo $this->getSingularName() ?>->getId(), 'actions/show.png', array('title' => 'Voir'), array('alt' => 'Voir')) ?--]
	    [?php echo catalyz_link_to_image_tag('@<?php echo $settings['routing'] ?>_edit?id='.$<?php echo $this->getSingularName() ?>->getId(), 'actions/edit.png', array('title' => 'Modifier'), array('alt' => 'Modifier')) ?]
	    [?php echo catalyz_link_to_image_tag('@<?php echo $settings['routing'] ?>_delete?id='.$<?php echo $this->getSingularName() ?>->getId(), 'actions/delete.png', array('title' => 'Supprimer', 'confirm' => 'Êtes-vous sûr de vouloir supprimer ce <?php echo $settings['singular'] ?> ?'), array('alt' => 'Supprimer')) ?]
	  </td>
	</tr>
  [?php endforeach ?]
  </table>
  [?php echo pager($pager, sprintf('<?php echo $this->getModuleName() ?>/index?sort=%s%s', $sf_request->getParameter('sort', '<?php echo $settings['default_sort'] ?>'), $sf_request->hasParameter('desc')?'&desc=on':'')) ?]
[?php endif ?]