<div class="content-add01">
	<div class="heading01"><h1>Liste des noeuds (<?php echo $pager->getNbResults() ?>)</h1></div>
</div>

<?php $is_admin_or_seo = $sf_user->hasCredential(array('admin', 'seo'), false) ?>

<?php if (empty($katao_nodeList)): ?>
	<p>Aucun noeud.</p>
	<p><?php echo link_to('Ajouter un noeud', '@katao_node_add', array('class' => 'add')) ?></p>
<?php else : ?>
  <?php if ($is_admin_or_seo): ?>
  	<?php echo link_to('Ajouter un noeud', '@katao_node_add', array('class' => 'add')) ?>
  	<?php echo link_to('Supprimer les noeuds sélectionnés (' . multiple_action_info_selected('katao_node') . ')', '@katao_node_delete_multiple', array('class' => 'delete', 'confirm' => 'Êtes-vous sûr de vouloir supprimer les noeuds sélectionnés ?')) ?>
  <?php endif ?>
  <table class="admin-list">
    <tr>
    <?php if ($is_admin_or_seo): ?>
	  <th nowrap="nowrap" width="1%"><?php echo multiple_action_checkbox_all('katao_node') ?></th>
	<?php endif ?>
	  <th nowrap="nowrap">Ville <?php echo sort_links($sf_request, 'city', 'kataoNode/index') ?></th>
	  <th nowrap="nowrap">Délégué <?php echo sort_links($sf_request, 'delegate', 'kataoNode/index') ?></th>
	  <th nowrap="nowrap">Date de début <?php echo sort_links($sf_request, 'date', 'kataoNode/index') ?></th>
	  <th nowrap="nowrap" width="1%">Actions</th>
	</tr>
	<?php foreach ($katao_nodeList as/*(KataoNode)*/ $katao_node): ?>
    <tr valign="top" class="line">
    	<?php if ($is_admin_or_seo): ?>
		  <td class="center"><?php echo multiple_action_checkbox_line('katao_node', $katao_node->getId()) ?></td>
		<?php endif ?>
		  <td nowrap="nowrap"><?php echo $katao_node->getCity() ?></td>
		  <td nowrap="nowrap"><?php echo $katao_node->getResponsibleLink() ?></td>
		  <td nowrap="nowrap"><?php echo $katao_node->getBeginAtStr() ?></td>
		  <td nowrap="nowrap">
	<?php if (!empty($managed_node_ids[$katao_node->getId()])): ?>
	    <?php echo catalyz_link_to_image_tag('@katao_node_manage_products?id=' . $katao_node->getId(), 'actions/products.png', array('title' => 'Gérer les produits par période'), array('alt' => 'Gérer les produits par période')) ?>
	<?php endif ?>
	<?php if ($is_admin_or_seo): ?>
		<?php echo catalyz_link_to_image_tag('@katao_node_edit?id=' . $katao_node->getId(), 'actions/edit.png', array('title' => 'Modifier'), array('alt' => 'Modifier')) ?>
	    <?php if (!$katao_node->getIsDefault() && $katao_node->isDeletable()): ?>
	    	<?php echo catalyz_link_to_image_tag('@katao_node_delete?id=' . $katao_node->getId(), 'actions/delete.png', array('title' => 'Supprimer', 'confirm' => 'Êtes-vous sûr de vouloir supprimer ce noeud ?'), array('alt' => 'Supprimer')) ?>
	    <?php endif ?>
	<?php endif ?>
	  </td>
	</tr>
  <?php endforeach ?>
  </table>
  <?php echo pager($pager, sprintf('kataoNode/index?sort=%s%s', $sf_request->getParameter('sort', 'city'), $sf_request->hasParameter('desc')?'&desc=on':''), $is_admin_or_seo?'katao_node':'') ?>
<?php endif ?>