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

<div class="filter" style="margin-bottom: 0px!important">
	<div class="filter-left">&nbsp;</div>
	<div class="filter-middle">
		<?php echo form_tag('@katao_supplier_filter') ?>
			<?php echo select_tag('filter_referer', options_for_select(KataoMemberPeer::getAllReferers(), $filter_referer, array('include_custom' => '&mdash;&nbsp;Référent&nbsp;&mdash;'))) ?>
			<?php echo image_tag('separator02.gif', array('alt' => '')) ?>&nbsp;<?php echo select_tag('filter_is_global', options_for_select(array(CONST_YES => 'National', CONST_NO => 'Local'), $filter_is_global, array('include_custom' => '&mdash;&nbsp;Type&nbsp;&mdash;'))) ?>
			<?php echo image_tag('separator02.gif', array('alt' => '')) ?>&nbsp;<?php echo select_tag('filter_node', options_for_select(KataoNodePeer::getAllArray(), $filter_node, array('include_custom' => '&mdash;&nbsp;Noeud&nbsp;&mdash;'))) ?>
			<?php echo image_tag('separator02.gif', array('alt' => '')) ?>&nbsp;<?php echo select_tag('filter_status', options_for_select(KataoUserPeer::getAllStatuses(true), $filter_status, array('include_custom' => '&mdash;&nbsp;Etat&nbsp;&mdash;'))) ?>
			<?php echo submit_tag('', array('class' => 'btn-search', 'title' => 'Filtrer')) ?><div style="float:right"><a href="<?php echo url_for('@katao_supplier_filter_reset') ?>">[annuler]</a></div>
		</form>
	</div>
	<div class="filter-right">&nbsp;</div>
</div>

<div class="filter">
	<div class="filter-left">&nbsp;</div>
	<div class="filter-middle">
		<?php echo form_tag('@katao_supplier_search') ?>
			Rechercher : <?php echo input_tag('search', $search, array('style' => 'width: 250px')) ?>
			<?php echo submit_tag('', array('class' => 'btn-search', 'title' => 'Rechercher')) ?><div style="float:right"><a href="<?php echo url_for('@katao_supplier_search_reset') ?>">[annuler]</a></div>
		</form>
	</div>
	<div class="filter-right">&nbsp;</div>
</div>

<?php if (empty($katao_supplierList)): ?>
	<p>Aucun fournisseur.</p>
	<p><?php echo link_to('Ajouter un fournisseur', '@katao_supplier_add', array('class' => 'add')) ?></p>
<?php else : ?>
  <?php echo link_to('Ajouter un fournisseur', '@katao_supplier_add', array('class' => 'add')) ?>
  <?php echo link_to('Exporter sur Zyvon', '@katao_supplier_export_zyvon', array('class' => 'zyvon')) ?>
  <?php echo link_to('Supprimer les fournisseurs sélectionnés (' . multiple_action_info_selected('katao_supplier') . ')', '@katao_supplier_delete_multiple', array('class' => 'delete', 'confirm' => 'Êtes-vous sûr de vouloir supprimer les fournisseurs sélectionnés ?')) ?>
  <table class="admin-list">
    <tr>
	  <th nowrap="nowrap" width="1%"><?php echo multiple_action_checkbox_all('katao_supplier') ?></th>
	  <th nowrap="nowrap">Nom <?php echo sort_links($sf_request, 'name', 'kataoSupplier/index') ?></th>
	  <th nowrap="nowrap">Téléphone <?php echo sort_links($sf_request, 'phone', 'kataoSupplier/index') ?></th>
	  <th nowrap="nowrap">Référent <?php echo sort_links($sf_request, 'referer', 'kataoSupplier/index') ?></th>
	  <th nowrap="nowrap">Type <?php echo sort_links($sf_request, 'type', 'kataoSupplier/index') ?></th>
	  <th nowrap="nowrap">Etat <?php echo sort_links($sf_request, 'status', 'kataoSupplier/index') ?></th>
	  <th nowrap="nowrap">CA € / <?php echo wpConfig::getAdditionalCurrencyName() ?></th>
	  <th nowrap="nowrap" width="1%">Actions</th>
	</tr>
	<?php foreach ($katao_supplierList as/*(KataoSupplier)*/ $katao_supplier): ?>
    <tr valign="top" class="line">
		  <td class="center"><?php echo multiple_action_checkbox_line('katao_supplier', $katao_supplier->getId()) ?></td>
		  <td>
		  <?php if ($katao_supplier->getEmail()): ?>
		  	<?php echo mail_to($katao_supplier->getEmail(), $katao_supplier->getName()) ?>
		  <?php else: ?>
		    <?php echo $katao_supplier->getName() ?>
		  <?php endif ?>
		  </td>
		  <td><?php echo $katao_supplier->getPhone() ?></td>
		  <td><?php echo $katao_supplier->getRefererLink() ?></td>
		  <td nowrap="nowrap"><?php echo $katao_supplier->getTypeStr(true) ?></td>
		  <td nowrap="nowrap"><?php echo $katao_supplier->getStatusStr() ?></td>
		  <td nowrap="nowrap"><?php echo $katao_supplier->getCAEuroStr() ?> / <?php echo $katao_supplier->getCASolStr() ?></td>
		  <td nowrap="nowrap">
	    <?php echo catalyz_link_to_image_tag('@katao_supplier_send_login?id=' . $katao_supplier->getId(), 'actions/send.png', array('title' => 'Envoyer le login'), array('alt' => 'Envoyer le login')) ?>
		<?php echo catalyz_link_to_image_tag('@katao_supplier_edit?id=' . $katao_supplier->getId(), 'actions/edit.png', array('title' => 'Modifier'), array('alt' => 'Modifier')) ?>
	    <?php echo catalyz_link_to_image_tag('@katao_supplier_edit_presentation?id=' . $katao_supplier->getId(), 'actions/presentation.png', array('title' => 'Modifier la présentation'), array('alt' => 'Modifier la présentation')) ?>
	    <?php echo catalyz_link_to_image_tag('@katao_supplier_gmap?id=' . $katao_supplier->getId(), 'actions/gmap.png', array('title' => 'Positionner sur la carte'), array('alt' => 'Positionner sur la carte')) ?>
	    <?php if ($katao_supplier->isDeletable()): ?>
			<?php echo catalyz_link_to_image_tag('@katao_supplier_delete?id=' . $katao_supplier->getId(), 'actions/delete.png', array('title' => 'Supprimer', 'confirm' => 'Êtes-vous sûr de vouloir supprimer ce fournisseur ?'), array('alt' => 'Supprimer')) ?>
		<?php endif ?>
	  </td>
	</tr>
  <?php endforeach ?>
  </table>
  <?php echo pager($pager, sprintf('kataoSupplier/index?sort=%s%s', $sf_request->getParameter('sort', 'name'), $sf_request->hasParameter('desc')?'&desc=on':''), 'katao_supplier') ?>
<?php endif ?>